Base Command Properties
An APL command is a message that can change the visual or audio presentation of the content on the screen.
A single command is encoded as a JSON object. All commands contain the following properties.
Type of the command
Optional documentation for this command
Delay time in milliseconds before this command runs. Must be non-negative. Defaults to 0.
If true, disable the interaction timer.
Specify the sequencer that should run this command.
Conditional expression. If this evaluates to
Specifies the particular command to run. This may be a pre-defined primitive command types or a user-defined command.
delay value is the amount of time in milliseconds inserted before running this command. The
delay value must be a non-negative integer, which if not specified, defaults to 0. The
delay value is ignored if the
when property resolves to
false, or if the command runs from within an event handler.
If true, the interaction timer is disabled while this command runs. When a command with
screenLock=true finishes running, the interaction timer is reset to 0.
screenLock applies to the entire extent of the command including
example, the following command holds the screen lock for 30 seconds:
If specified, the
sequencer property names the sequencer that this command should run on. The sequencer selection rules are (in order):
- If the sequencer is specified, the command runs in normal mode on that sequencer.
- Else, if the command is running in fast mode, run normally in fast mode
- Else, if the command is a subcommand of a
Parallelcommand, run in normal mode on the sequencer of the
- Else, run the command in normal mode on the "MAIN" sequencer.
For details about the command sequencer, see Command sequencing
when is set to
true, run the command. If
false, ignore the command. Commands that are ignored also ignore the
The Reinflate command reinflates the document, which by default ends any running commands. You can change this default by defining a
sequencer for the command, and preserving that
sequencer with the preservedSequencers property on the
For any command, when the command runs on a preserved
sequencer and the
Reinflate command runs, the remaining
delay for the command is saved.
For example, assume an
Idle command has delay set to 2000 ms and 1000 ms have elapsed when a reinflate occurs. After reinflation, the Idle command continue to run for the remaining 1000 ms specified in
All commands can have a
delay. Some commands take time to run, such as
SpeakItem. These commands resume after reinflation when run on a preserved sequencer. Refer to the reinflation strategy section for a command to understand how the command behaves when it is preserved during reinflation.
Was this page helpful?
Last updated: frontmatter-missing