State Management
Previous Top Next

State management is a completely optional capability for advanced users. If you don't check the Script | Show States menu item, you won't see states and never have to think about them.

If you do check this item, or load a script that uses states, the step editor will have a new tab, States, that allows you to do three things. First, you can define up to 14 named states for your script. These are "global" -- that is, they apply to the whole script. If you change a state name on one step, it will apply to all other steps as well.

The second thing you can do is make a step "sensitive" to the current state (the current state is initially undefined). That is, you can make a step only execute if the current state matches certain values.

The third thing you can do with the state tab is to select a new state to enter when the step completes execution. This will occur after any other actions in the step.

The step below shows a script with three states "Off, On, and Idle". The current step will only execute when in the off or idle state and after it executes, the new state will be #2 (On). Of course, that assumes the step executed -- so the current state had to be Off or Idle, the step had to be enabled, and any condition on the condition tab had to be met.


Normally, the first step in a state-enabled script will set the initial state.