App Control Commands

App Control Commands

App control commands are commands that emulate user interaction with a desktop application. I.e. they select controls, press buttons, type text or click the mouse.

LeftClick

Performs a mouse left click at the provided co-ordinates.

The mouse cursor is returned to the starting point after performing the click so that the user is not inconvenienced by it.

When entering constant values these are in pixels and are relative to the top left of the application window. i.e. they are not screen absolute.

The special values

  • HorizontalMiddle

  • VerticalMiddle

automatically refer to the centre position of the selected window.

Syntax Diagram


Parameters

Refer to the syntax diagrams for the valid combinations and positioning of the parameters.

Parameter Name

Description

xPixels

The number of pixels from the left edge of the application window.

HorizontalMiddle

Automatically determined pixel number for the horizontal centre of the application window.

yPixels

The number of pixels from the top edge of the application window.

VerticalMiddle

Automatically determined pixel number for the vertical centre of the application window.

Example

 /*
Select a control then left click its centre point.
Unselect the control then click the main window's centre point.
*/

// Control "x" gets focus
SelectControl "x"

// Click Middle of control "x"
LeftClick HorizontalMiddle VerticalMiddle

// Deselect the control "x"
UnSelect

// The control still has focus

// Click middle of window that is "x"'s parent
LeftClick HorizontalMiddle VerticalMiddle

// The parent window now has focus

Application Notes

Using a left click is an alternative way of bringing a window into focus.

If you try to use this method make sure you do not inadvertantly click on a control.


    • Related Articles

    • Main Window Commands

      Main window commands are responsible for interacting with the primary window of an application, or the application itself rather than the current child window. BringToForeground The BringToForeground command is used to bring the main application into ...
    • Desktop Client Commands

      Table of Script Commands Command Description AlertInfo / AlertError Commands to show text messages to users. BringToForeground Attempt to force the main app window to desktop’s foreground. InteractiveSelectBookmark Allows manual intervention when ...
    • Error Directive, Alerting & Logging Commands

      OnError Controls the processing of a script in the event of a runtime error. Multiple OnError commands may be used to control behaviour at different points in the script. Syntax Diagram Parameters Terminate - stop script execution Continue - continue ...
    • Defining a Desktop App Template

      Desktop Template Definition The desktop application template is defined in the My1Login admin area (the script has been omitted from this view). Setting Explanation Name The template name, user bookmarks have their title defaulted to this value. ...
    • Child Windows

      Child Windows Child window commands are responsible for triggering behaviour when a dialog (child window) of the monitored process opens. WhenWindow Waits until a window (dialog box) child of the target app, whose caption matches the parameter value ...