Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

(Note: the “storeEval” command below “storeAssertImageAt” changes the message to output

onCondition

View file
nameInvalid file id - UNKNOWN_MEDIA_ID
pageDecember 2019 Product Updates
spaceANPU

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
nameInvalid file id - UNKNOWN_MEDIA_ID
pageDecember 2019 Product Updates
spaceANPU

Updates are available - proceed the script from this point.

label (on True)

View file
nameInvalid file id - UNKNOWN_MEDIA_ID
pageDecember 2019 Product Updates
spaceANPU

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
languagejson
    {
      "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
    },

...