Interaction with MouseRobot


VBScript program is easily integrated into any task MouseRobot and may influence the course of implementation. The main way of interacting with MouseRobot is setting the values of variables. These values can be handled by other steps, such as "Condition (If ... Else)", used in the formation of results and for other purposes. Interaction with MouseRobot provided with Evaluate and SetValue functions.

Getting the value of  MouseRobot variable or expression

Evaluate function allows you to calculate the value of a variable or expression value.

Example

Getting the name of the latest found object:

Dim name

name = WScript.Evaluate("{ControlName({LastControl})}")

MsgBox "Last found object name is " + name

Suppose that in the previous step has been found "Start" button on the taskbar Windows. Then the next step:

Will lead to information window (the result of a function call MsgBox)

Setting MouseRobot variables

SetValue function allows you to store the resulting value, a set of values or any other information in a variable MouseRobot.

Example

Calculating area of a circle.

Dim R

Dim a

R = WScript.Evaluate("{radius}")

a = 3.14 * (R^2)

WScript.SetValue "{area}", a

MouseRobot task:

Dialog for entering the circle radius:

Result dialog (area of a circle with a given radius):