Skip to Content

Events

An event is a robot’s reaction to actions occurring in the operating system. Currently, handlers for the following event groups are available:

  • Desktop events (mouse click, keyboard key press, process launch, process termination, element attribute change)
  • Browser events (mouse click, keyboard key press, element attribute change)
  • OCR events (image click)
  • File system events (file change)

To create an event handler, add an Events container to your project from the Desktop ➝ Events element group:

events1.png

The container consists of two subcontainers: Events and Actions. The Events subcontainer contains elements describing the tracked event, and the Actions subcontainer contains event data handlers:

events2.png

In this example, a Message box will be displayed each time a mouse click is made on the screen. Information about the event that occurred is available in the arguments variable (args).

Events are a loop that runs in the following modes:

  • One Time - stops tracking events after the first trigger.
  • Sequential - continues tracking after all actions are completed.
  • Parallel - never stops tracking and launching actions.

The event loop can run either sequentially with the robot’s algorithm or in parallel (this is controlled by the Thread property). When running sequentially, the robot’s algorithm waits for the event loop to complete. When running in parallel, the main algorithm continues to run, and event tracking occurs in the background.

You can exit the event loop using the Exit proccess element or using the Stop Events element. An additional function of Stop events is the ability to stop the event loop from any part of the robot.

Last updated on