A switch-like script which responds to TurnOn and TurnOff messages.
Before activating the trap, the message can be altered by the Trap Control Flags property. Except for the Once
flag, which will set the Engine Features→Locked property after the trap is activated.
A trap that is locked, either with the Engine Features→Locked property or with a Lock link will not respond to any messages.
After being turned on, the trap will automatically turn off if the Script→Timing property is set. The script waits for the given time in milliseconds before turning off. An automatic off will occur even if the trap was locked after the initial on.
You can send a ScriptControl message to a trap instead of TurnOn or TurnOff. The first message argument tells whether to activate or deactivate the trap. As a number, the trap will turn off when it is zero, or turn on for any other number. The argument can also be one of the words on
, off
, turnon
, turnoff
, true
, false
, yes
, no
. Upper and lower-case letters are treated the same.