ACTION
This element represents an action that can be triggered by the end user with an action button, or by other events, for example using the ACTION_TRIGGER element.
Attributes brief detailed show all inherited
Name | Description | ||||
---|---|---|---|---|---|
type | The type of action to execute. See the available Action Types for more information | ||||
name | Displayed named of the action | ||||
comment | Comment about the action | ||||
enabled | activation status of the action | ||||
Common attributes | |||||
id | Identifier of the element |
Examples
The following action runs a script that increases the variable each time it is executed and updates a string.
- <!-- action that runs a script -->
- <ACTION id="run_my_script" name="Click me" type="Script"
- script="
- string s = "Script executed ";
- run_count++;
- out_string = s + run_count + " times";
- " requires="out_string;run_count" />
- <!-- add a script variable -->
- <SCRIPT script="int run_count = 0;" />
- <!-- string to output results -->
- <STRING id="out_string" default="" />
- <TEXT_FIELD width="300" string_id="out_string" />
- <!-- a simple button -->
- <SYSTEM_ACTION_BUTTON action_id="run_my_script" width="180" />
Different action types allow you to open file dialogs, open URLs in browser, open files with standalone apps (including running batch/bash/misc scripts with terminal or command line), open folder dialogs in Finder/Explorer, display message boxes, save and open data (objects) to files, copy and paste data to/from clipboard, and certainly run AngelScript code in the GUI.
Check out a full list of action types and examples.
Built-in actions
These actions can be used to make your own skin from scratch.
- <!-- open main menu -->
- <SYSTEM_ACTION_BUTTON action_id="OpenMenu" width="180" />
- <!-- open presets menu -->
- <SYSTEM_ACTION_BUTTON action_id="OpenPresetsMenu" width="180" />
- <!-- open window with preset settings (midi mapping etc) -->
- <SYSTEM_ACTION_BUTTON action_id="OpenPresetSettings" width="180" />
- <!-- open window with global settings (midi mapping etc) -->
- <SYSTEM_ACTION_BUTTON action_id="OpenGlobalSettings" width="180" />
- <!-- open 'About' dialogue -->
- <SYSTEM_ACTION_BUTTON action_id="DisplayAbout" width="180" />
- <!-- open manual (if exists) -->
- <SYSTEM_ACTION_BUTTON action_id="OpenManual" width="180" />
- <!-- Undo and Redo -->
- <SYSTEM_ACTION_BUTTON action_id="Undo" width="180" />
- <SYSTEM_ACTION_BUTTON action_id="Redo" width="180" />
- <!-- open "Load preset" window -->
- <SYSTEM_ACTION_BUTTON action_id="LoadPreset" width="180" />
- <!-- open "Save preset as" window -->
- <SYSTEM_ACTION_BUTTON action_id="SavePreset" width="180" />
- <!-- saves current state as "User default" (without confirmation) -->
- <SYSTEM_ACTION_BUTTON action_id="SaveAsDefaultPreset" width="180" />
- <!-- switches no Next or Previous preset -->
- <SYSTEM_ACTION_BUTTON action_id="NextPreset" width="180" />
- <SYSTEM_ACTION_BUTTON action_id="PreviousPreset" width="180" />
- <!-- shows the popup-menu for the input or output parameter (midi learn/control setup etc) -->
- <SYSTEM_ACTION_BUTTON action_id="Show_dsp.input0_ControlSetup" width="180" />
- <SYSTEM_ACTION_BUTTON action_id="Show_dsp.output0_ControlSetup" width="180" />
Built-in action types
These action types can help you create various actions:
- <!-- run a script -->
- <ACTION id="my_action" type="Script" script="..." />
- <!-- copy object to/from clipboard or file -->
- <ACTION id="my_action" type="CopyObject" object_id="..." ... />
- <ACTION id="my_action" type="PasteObject" object_id="..." ... />
- <ACTION id="my_action" type="LoadObject" object_id="..." ... />
- <ACTION id="my_action" type="SaveObject" object_id="..." ... />
- <!-- open file and folder dialogs -->
- <ACTION id="my_action" type="OpenDirectory" url="..." ... />
- <ACTION id="my_action" type="DisplayFileOpenDialog" ... />
- <ACTION id="my_action" type="DisplayFileSaveDialog" ... />
- <ACTION id="my_action" type="DisplayFolderSelectDialog" ... />
- <!-- open url or a file, run an app -->
- <ACTION id="my_action" type="OpenUrl" url="..." ... />
- <!-- display message box -->
- <ACTION id="my_action" type="DisplayMessageBox" message="..." ... />
- <!-- related to making a custom skin -->
- <ACTION id="my_action" type="DisplayPlugNScriptMenu" ... />
- <ACTION id="my_action" type="ExportPlugNScriptPlugin" ... />
- <ACTION id="my_action" type="GeneratePlugNScriptGUID" ... />
Check out the page about Action types with examples.