Adapter Events

Studio projects can be used to monitor the amount of time an application has been in active use. The AdapterLostFocus event exposed on the web and Windows-based adapters occurs whenever focus changes from any of the application windows to another application window (running under a different adapter or any other application on the desktop).

Once the event is triggered, a Duration event argument is calculated which tallies the amount of time (in milliseconds) that the application was in focus. You can use the AdapterLostFocus event with Studio's Events feature in Generic and Custom events projects and/or directly in project automations. You can use AdapterLostFocus event with Java, Remedy Forms, Oracle Forms, and SAP GUI applications.

This topic describes:

 

How the AdapterLostFocus Event is Triggered

The AdapterLostFocus event is raised when focus changes from any of the monitored application's windows to another window on the user's desktop. This can occur as the result of the following actions:

 

Accessing the Application Focus Duration Value

When the AdapterLostFocus event is raised, a duration value is calculated and output as the AdapterLostFocus Duration event argument (Int32 type). Studio tallies the amount of time, in milliseconds, during which the application was in focus prior to losing focus. This connection block shows the Duration event argument:

 

Using the AdapterLostFocus Event in a Sample Automation

this automation shows using the AdapterLostFocus event and how to store the Duration values in a table:

 

Using the Events Feature - AdapterLostFocus

When you use the Events feature to monitor application activity, you can record application focus using Generic event notifications:

  1. Set the MonitoredEventsMode property for the application adapter to either All Controls or Interrogated Controls.

  2. Browse the MonitoredEvents property and select the Adapter - LostFocus event.

  3. Interrogate at least one window or page in the application you want to monitor.

  4. Add and configure the EventServiceWebServiceConnector component to distribute event notifications.

While running the project, event notifications are triggered when the focus changes from the monitored application. The Duration value is calculated and sent with the LostFocus event.

 


Privacy | Trademarks | Terms of Use | Feedback

Updated: 18 June 2020

© 2016 - 2020 Pegasystems Inc.  Cambridge, MA All rights reserved.

 

OpenSpan data classification label