Interactive Console Commands

In addition to Automa's API functions, the following commands are available to you in the interactive console window:

clear()

Clears the contents of Automa's console window.

get_name_under_mouse(after_secs=None)

Returns the name of the GUI element that is currently under the mouse cursor. The typical usage is:

get_name_under_mouse()
If optional parameter "after_secs" is given, as for example in:
get_name_under_mouse(3)
then Automa sleeps for 3 seconds before printing the name under the mouse cursor. This gives you time to switch away from Automa and for example move the mouse cursor over a nested menu entry.

The importance of a GUI element's name is that all of Automa's search algorithms distinguish by name. If a value other than the one returned by get_name_under_mouse is used, Automa won't be able to find the respective GUI element.

save(file_path=None)

Saves the history of commands entered in this console session to a file that can then be played back via playback(). If file_path is not given, a file dialog is displayed that lets the user choose where the history should be saved. Some commands that are not required for playing back the history are omitted in the saved file, such as 'help', 'history', 'save' and 'playback'.

playback(file_path=None)

Plays back a history of commands saved via the command save(...). If file_path is not given, a file dialog is displayed that lets the user pick a file to play back.

start_tutorial()

Starts Automa's tutorial.

highlight(gui_element)

Highlights the given GUI element on the screen by drawing a red rectangle around it. For example:

highlight(Window("Automa"))
In fact, not just GUI elements but all objects with properties 'x', 'y', 'width' and 'height' can be highlighted this way.

history()

Displays the commands entered so far in this console session. Commands that contained a syntax error or raised an exception are not displayed.

about()

Prints information about Automa and licensing information on the external libraries it uses.

exit()

Quits Automa.