...
(Note: the “storeEval” command below “storeAssertImageAt” changes the message to output
onCondition
View file | ||||||
---|---|---|---|---|---|---|
|
Note the specific “JavaScript” expression here - it utilizes the “return” keyword to return either true or false. If true, the script jumps to the label specified on “Label on True”. If false, the script jumps to the label specified on “Label on False”. Note that it is currently not possible to jump backwards in the script at this time - both labels need to be present after the “onCondition” command.
label (on False)
View file | ||||||
---|---|---|---|---|---|---|
|
Updates are available - proceed the script from this point.
label (on True)
View file | ||||||
---|---|---|---|---|---|---|
|
Updates are not available - proceed the script from this point, skipping all of the update steps as they are not necessary and could cause script failure.
Example using storePixelColor
Code Block | ||
---|---|---|
| ||
{ "command": "storePixelColor", "args": { "key": "lowerLeftCorner", "x": 60, "y": 930 }, "ignore_timing": true }, { "command": "onCondition", "args": { "expression": "if (${lowerLeftCorner_red} > 240) {return true;} else {return false;}", "labelOnTrue": "maxTrue", "labelOnFalse": "maxFalse" }, "ignore_timing": true }, |
...