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
KUIML exposes several built-in actions that can be helpful if you're developing your own skin from scratch.
Some of built-in actions
| Name | Description | |
|---|---|---|
| OpenMenu | Opens the main plug-in menu. | |
| OpenPresetsMenu | Opens the plug-in presets menu. | |
| DisplayAbout | Displays the "About Box" window. | |
| OpenManual | Opens the plug-in manual. | |
| Undo | Triggers Undo. | |
| Redo | Triggers Redo. |
See the full list of available built-in actions.
These actions can be used to make your own skin from scratch. You can run them via ACTION_TRIGGER, via IMAGE_ACTION_BUTTON, via SYSTEM_ACTION_BUTTON or via script.
Simple example
- <!-- open main menu -->
- <SYSTEM_ACTION_BUTTON action_id="OpenMenu" 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="..." />
- <!-- run a sequence of actions -->
- <ACTION id="my_action" type="Sequence" action_ids="action1;action2" />
- <!-- 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="..." ... />
- <!-- load url or a file via http or https -->
- <ACTION id="my_action" type="LoadUrl" ... />
- <!-- 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.
Comments
Please, authorize to view and post comments.