if

If the condition is true, runs the commands in the block. Otherwise, runs the commands in the else block.

ArgumentTypeDescription

condition

string

The condition to evaluate.

then

list of commands

The commands to run if the condition is true.

else

list of commands

The commands to run if the condition is false.

Example Usage

command: if
condition: the active window is "Google Chrome"
then:
  - command: hover-text
    text: Search Google or type a URL
    description: main google search
    action: click
  - command: type
    text: monster trucks
    description: search for monster trucks
else:
  - command: focus-application
    name: Google Chrome

Last updated