Skip to main content

Triggers

Element type: Array (String)

There are several ways to trigger an action set. The possible options are the following.

Value

NameDescription
LaunchThe action set will be executed at the application launch.
TerminationThe action set will be executed when the application is about to be terminated.
NextButtonClickThe action set will be triggered when the Next button of the navigation view is clicked. The set is executed regardless of the validity of the slide. You can conditionally execute the set with a condition on the current slide validity by using the CURRENT_SLIDE_VALID placeholder.
PreviousButtonClickThe action set will be triggered when the Previous button of the navigation view is clicked.
Update(VariableName)The action set will be triggered when the variable VariableName is updated.
AppLaunch(BundleID)The action set will be triggered when the application with the provided bundle ID is launched. Availability: 2.1.0+
Custom(TriggerName)Allows to manually trigger an action set using the octo-notifier command-line tool, a Button component or a DisplayNotification action Trigger key. Availability: 2.1.0+
Every(Seconds)Allows to repeat an action every x seconds while Octory is running. The default value is 5 seconds if the seconds input is invalid.

Example

The following action set will be triggered when the placeholder INSTALLATION_COMPLETE is updated, and executed only if the installation of all app monitors is complete (i.e. INSTALLATION_COMPLETE is true). It holds an action to display an alert to the user, and one to play a custom sound.

info

INSTALLATION_COMPLETE and OCTORY_DIRECTORY are placeholders offered by the application.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>ActionSets</key>
<array>
<dict>
<key>Type</key>
<string>Parallel</string>
<key>Condition</key>
<string>Update(INSTALLATION_COMPLETE)</string>
<key>Triggers</key>
<array>
<string>Termination</string>
</array>
<key>Actions</key>
<array>
<dict>
<key>Type</key>
<string>DisplayAlert</string>
<key>Title</key>
<string>Your ${DEVICE_MODEL_NAME} is ready</string>
<key>Message</key>
<string>You may now close the window with the "Quit" button</string>
<key>Style</key>
<string>Informational</string>
</dict>
<dict>
<key>Type</key>
<string>PlaySound</string>
<key>SoundNameOrFilePath</key>
<string>${OCTORY_DIRECTORY}/Resources/Sounds/finish.mp3</string>
</dict>
</array>
</dict>
</array>
<!-- ... -->
</dict>
</plist>

The following action set will be triggered when the user clicks on one of the navigation buttons, and will execute a command to retrieve the local IP address. Then, it will display an alert with the value of the IP address. As the DisplayAlert action uses the variable LocalIP updated by the ExecuteCommand action, the Type of the action set is "Chained".

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>ActionSets</key>
<array>
<dict>
<key>Type</key>
<string>Chained</string>
<key>Triggers</key>
<array>
<string>PreviousButtonClick</string>
<string>NextButtonClick</string>
</array>
<key>Actions</key>
<array>
<dict>
<key>Type</key>
<string>ExecuteCommand</string>
<key>Command</key>
<string>ifconfig | grep "inet " | head -n 2 | tail -n 1 | cut -d " " -f 2</string>
<key>Variable</key>
<string>LocalIP</string>
</dict>
<dict>
<key>Type</key>
<string>DisplayAlert</string>
<key>Title</key>
<string>This is your local IP</string>
<key>Message</key>
<string>You IP is: ${LocalIP}</string>
<key>Style</key>
<string>Informational</string>
</dict>
</array>
</dict>
</array>
<!-- ... -->
</dict>
</plist>