Command |
Description |
Call |
Call command enables the execution of another script. This command allows the passing of multiple parameters to the invoked script. Note that the called script inherits all parameters and settings from the called script. |
Check |
The Check command is designed to verify the presence of an image or a specific part of an image on the screen. This is essential for confirming a system state or synchronizing the script with the System Under Test (SUT) execution.
Upon selecting an image within the script and using the Properties dialog, users can define a target area for detailed checking. The command actively waits up to 30 seconds for the target image to appear, ensuring the script proceeds only when the system reaches the desired state. For successful verification, the target area must match with at least 80% accuracy, while allowing for a 30% deviation in the remaining aspects by default. Unlike static waits that delay script execution based on a set time, this dynamic wait optimizes script performance by continuing execution immediately after identifying the sought image.
Additionally, while the default values provide a solid starting point, users can fine-tune the verification process through related commands. See also: ConfirmationLevel and Recognition for modifying the accuracy and recognition thresholds. |
CheckNot
|
The CheckNot command checks that a certain image is no longer visible on the screen. If the image is still there, the script will stop and wait. As soon as the image disappears, the script will start running again. This is useful for making sure the script only moves forward when an image has gone away.
Additionally, while the default values provide a solid starting point, users can fine-tune the verification process through related commands. See also: ConfirmationLevel and Recognition for modifying the accuracy and recognition thresholds. |
Click |
The Click command allows you to do a left-click on an image displayed on the screen. |
Find |
The Find command identifies the location(s) (x, y coordinates) of a specified image on the screen, along with the total number of matches found by the image recognition algorithm. This command is versatile and supports multiple use cases. For instance, it can be used to verify if an image is located at a specific position by using the “Check {MatchCount} expected value” function. Additionally, it can be utilized to either “Move or Click” on MatchLocation.
Furthermore, the output of the Find command, which is stored in an internal variable called MatchCount, can be utilized in conjunction with the Check method to verify that the number of identified matches aligns with an expected value (e.g., “Check {MatchCount} X”, where X is an integer specifying the expected number of matches). |
If
|
The If command checks if a certain image is on the screen. If the image is there, the script will do what’s written next until it reaches “EndIf”. You can also set conditions, like if the script finds the image 2 times ({MatchCount}=“2”), then it will run some specific code. |
IfNot |
The IfNot command checks the opposite condition of a statement, for example, if an image is not visible on the screen or a certain condition is not met, like {MatchCount} = “1” being false, then the script will execute the commands that follow it. |
Move |
The Move command is used to position the mouse cursor at a specific location on the screen. You can use it to move the cursor to an image or directly to a set of coordinates, such as Move 500 500, which places the cursor at the (x, y) location of 500, 500 on the screen. Move uses an absolute coordinate system where origo (x0, y0) is in the upper left corner of the screen. |
MoveRelative |
The MoveRelative command shifts the mouse cursor from its current position by a specified amount. For instance, using Move 500 0 moves the cursor 500 pixels to the right, while Move 0 -500 moves it 500 pixels upwards from where it was last positioned. This allows for adjustments based on the cursor’s last known location, facilitating precise navigation on the screen. |
Paste |
The Paste command allows you to insert any text. You can directly paste a specific string by using Paste “any text”, or you can paste text using a parameter. For example, first, you set a variable with Set “helloTxt” “Hello”, and then you can paste the text stored in that parameter by using Paste {helloTxt}. This makes it easy to insert predefined or dynamic text into fields, or other text areas. |
Repeat |
The Repeat command allows you to execute a command or a series of commands multiple times. You can specify the number of repetitions directly, such as repeating a command 5 times, or use a parameter for flexibility, like first setting repeatNr to 5 with Set “repeatNr” 5 and then using Repeat {repeatNr} to perform the repetition. Additionally, the Repeat command can be used to iterate over each row in a Data file that follows the CSV format, executing one or more commands for each row. |
Sleep |
The Sleep command pauses the script for a specified number of milliseconds, known as a “static sleep”. While it can temporarily halt script execution for precise timing, it’s generally recommended to use it sparingly. Static sleeps can either slow down the script unnecessarily if set for too long or make the script unreliable if the delay is too short. Whenever feasible, opting for a Check command is advised, as it allows the script to proceed based on conditions rather than fixed time intervals, enhancing both efficiency and reliability. |
StartFile |
The StartFile command enables you to open a file or launch an application directly from your script. By specifying the path to a file, such as an executable (.exe) file, you can automate the process of starting software or opening documents. For example, you can use it to automatically launch a web browser. |
StartWeb |
The StartWeb command initiates a web browser session and navigates to a specified website. By using this command followed by a URL, such as `StartWeb “http://www.symatiq.com”, you can automate the process of opening web pages directly from your script. |
Type |
The ‘Type’ command inputs text into the current focus area character by character. This method is ideal for simulating manual typing in various applications. However, it’s important to note that the `Type` command may encounter issues with Swedish characters on MacOS, attributed to the differences in keyboard layouts and keysets between Windows and MacOS systems. Users should be aware of these limitations when automating tasks that require typing non-standard characters on MacOS. For typing non-standard characters, we recommend using the Paste command instead. |
While |
The `While` command is used to repeatedly execute a set of commands as long as a specified image is visible or an expression evaluates to true. This looping mechanism continues until the condition is no longer met. Additionally, the command tracks the number of iterations performed and stores this value in the `{Iterations}` parameter. The `While` command can also be adapted to work with parameters, allowing for dynamic conditions such as `While {value} = 4`, which loops the commands while the specified condition (`{value} = 4`) remains true. |
WhileNot |
The WhileNot command is designed to execute a set of commands repeatedly, as long as a specified condition is not met. This condition can be the absence of a visible image on the screen or an expression that evaluates to false. The looping continues until the specified image becomes visible or the condition changes to true, ensuring that the script only proceeds once the required state is achieved.
Additionally, WhileNot tracks the number of iterations completed during its execution and stores this value in the {Iterations} parameter. This feature is useful for monitoring how many times the loop has run, which can help in debugging and optimizing the script. The command also supports dynamic conditions through parameters, such as WhileNot {value} = 4, which allows the commands within the loop to execute as long as the condition {value} = 4 remains false. |