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 to use the AdapterLostFocus event in an example automation
How to use the AdapterLostFocus event with OpenSpan's Events feature
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:
User selects or opens an application window not related to the application being monitored.
User changes active window focus using Alt+Tab to an application window not related to the application being monitored.
User changes active window focus using by selecting an application window from the Windows taskbar which is not related to the application being monitored.
User changes active window focus using the Windows Task Manager >| Switch To function.
Project automation changes application window focus.
A screen saver is launched.
User locks the desktop.
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:
this automation shows using the AdapterLostFocus event and how to store the Duration values in a table:
When you use the Events feature to monitor application activity, you can record application focus using Generic event notifications:
Set the MonitoredEventsMode property for the application adapter to either All Controls or Interrogated Controls.
Browse the MonitoredEvents property and select the Adapter - LostFocus event.
Interrogate at least one window or page in the application you want to monitor.
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: 01 July 2024
© 2016 - 2024 Pegasystems Inc. Cambridge, MA All rights reserved.