PLUG'N SCRIPT
rapid plugin development
Tutorial
DSP
KUIML
How-to
Scripts
  • Tutorial
  • Element Reference
Language basics
  • SKIN
  • DUMMY
  • INCLUDE
  • INCLUDE_ONCE
  • DEFINE
  • UNDEFINE
  • VARIABLE
  • LOCAL_VARIABLE
  • TEMPLATE
  • TEMPLATE_INNER_CONTENT
  • REPEAT
Data model
  • PARAM
  • ACTION
    • Action types
  • ACTION_TRIGGER
UI Layout and positioning
  • CELL
  • TABLE
UI Widgets
  • TEXT
  • TEXT_FIELD
  • TEXT_EDIT_BOX
  • CANVAS
    • Graphics API
  • svg
Common attrubutes
  • For all elements
  • Widgets
  • Param Widgets
  • Param Controls
  • Param Info Viewers
  • Text Widgets
  • Surface Viewers
  • Curve Viewers
  • 3D Objects
  • Parameters mapping
KUIMLElement ReferenceACTIONAction types
December 19, 2022

Action types

The KUIML engine exposes the following built-in actions, to be used with the ACTION element.

General purpose

Script brief detailed show all inherited

Name Description
scriptThe script to be executed.This is not the path to the script file but the actual script to be executed. For example: "DoStuff();"
requiresList of objects expected by the script.Forces the KUIML engine to expose the listed objects to the scripting engine.
Name Value type Default Description Comment
scriptscriptemptyThe script to be executed.This is not the path to the script file but the actual script to be executed. For example: "DoStuff();"
requireslist of ';' separated identifiers or wildcardsemptyList of objects expected by the script.Forces the KUIML engine to expose the listed objects to the scripting engine.

When triggered, executes a script. Useful to make your GUI more dynamic: with the script you can change many KUIML attributes on the fly, display and hide widgets, track keyboard and mouse state, etc.

Action type Script

  1. <!-- action that runs a script -->
  2. <ACTION id="run_my_script" type="Script"
  3. name="Run a demo script"
  4. script=" 
  5. string s = &quot;Script executed &quot;;
  6. run_count++;
  7. out_string = s + run_count + &quot; times&quot;; "
  8. requires="out_string;run_count" />

  9. <!-- add a script variable that action can access -->
  10. <SCRIPT script="int run_count = 0;" />

  11. <!-- string to output results -->
  12. <STRING id="out_string" default="Not executed" />
  13. <TEXT_FIELD width="300" string_id="out_string" />
  14. <CELL height="7" /> <!-- adds some vertical space -->

  15. <!-- a simple 'button' -->
  16. <WIDGET id="demo_button" background_color="#000088" text_color="#FFFFFF" >
  17. <TEXT value="Click me" width="100" height="40">
  18. <INVISIBLE_ACTION_BUTTON id="demo_inv_act_button" action_id="run_my_script" width="100%" height="100%" />
  19. </TEXT>
  20. </WIDGET>

  21. <!-- trick to make the button move slighly when the mouse is down -->
  22. <PARAM_MULTI_LINK from="demo_inv_act_button.mouse_down" to="demo_button.v_offset;demo_button.h_offset" />

We can use a SCRIPT element to add functions or variables that will be "global", or more precisely available to all ACTIONs within the current scope (current skin or current KUIML_WIDGET subskin).

System

CopyObject brief detailed show all inherited

Name Description
object_idIdentifier of the object to be stored into the clipboard.All object types are supported: parameters, strings, groups, curves, surfaces, properties...
applicative_typeOptional string to qualify the applicative use of the object.Use the applicative type to make sure that objects can be pasted only where they can be accepted. If no applicative type is defined, the content can be pasted into any compatible object. Experimental since 2.7: use the system::text applicative type to copy the content of a parameter or string as system text into the clipboard.
copy_contextOptional string to define the serialization context used for the copy operation.
Name Value type Default Description Comment
object_idobject identifieremptyIdentifier of the object to be stored into the clipboard.All object types are supported: parameters, strings, groups, curves, surfaces, properties...
applicative_typestringemptyOptional string to qualify the applicative use of the object.Use the applicative type to make sure that objects can be pasted only where they can be accepted. If no applicative type is defined, the content can be pasted into any compatible object. Experimental since 2.7: use the system::text applicative type to copy the content of a parameter or string as system text into the clipboard.
copy_contextstringemptyOptional string to define the serialization context used for the copy operation.

Copies the selected object into the system cliboard.

PasteObject brief detailed show all inherited

Name Description
object_idIdentifier of the object to be pasted from the clipboard.All object types are supported: parameters, strings, groups, curves, surfaces, properties...
applicative_typeOptional string to qualify the applicative use of the object.Use the applicative type to make sure that objects can be pasted only where they can be accepted. If no applicative type is defined, any compatible content can be pasted into the object. Experimental since 2.7: use the system::text applicative type to paste text from the clipboard into a parameter or string.
paste_contextOptional string to define the serialization context used for the paste operation.
Name Value type Default Description Comment
object_idobject identifieremptyIdentifier of the object to be pasted from the clipboard.All object types are supported: parameters, strings, groups, curves, surfaces, properties...
applicative_typestringemptyOptional string to qualify the applicative use of the object.Use the applicative type to make sure that objects can be pasted only where they can be accepted. If no applicative type is defined, any compatible content can be pasted into the object. Experimental since 2.7: use the system::text applicative type to paste text from the clipboard into a parameter or string.
paste_contextstringemptyOptional string to define the serialization context used for the paste operation.

Pastes the contents of the system clipboard into the selected object.

Copying text to clipboard

  1. <!-- actions to copy/paste to clipboard-->
  2. <ACTION type="CopyObject"
  3. id="demo_CopyObject"
  4. object_id="demo_string"
  5. applicative_type="system::text"
  6. name="Copy to clipboard"
  7. />
  8. <ACTION type="PasteObject"
  9. id="demo_PasteObject"
  10. object_id="demo_string"
  11. applicative_type="system::text"
  12. name="Paste from clipboard"
  13. />

  14. <!-- add a demo string-->
  15. <STRING id="demo_string" default="Some text"/>
  16. <ROW margin="20">
  17. <TEXT_EDIT_BOX string_id="demo_string" width="300" />
  18. </ROW>

  19. <!-- display built-in system buttons -->
  20. <ROW>
  21. <SYSTEM_ACTION_BUTTON action_id="demo_CopyObject" width="150" />
  22. <SYSTEM_ACTION_BUTTON action_id="demo_PasteObject" width="170" />
  23. </ROW>

LoadObject brief detailed show all inherited

Name Description
object_idIdentifier of the object to be loaded.All object types are supported: parameters, strings, groups, curves, surfaces, properties...
file_path_string_idThe identifier of the string object where the path to the file is stored.
root_pathList of root directories for all paths, separated by ';'. Relative paths will be "absolutized" using these root paths until the file is found.
root_path_index_param_idundocumented
applicative_typeOptional string to qualify the applicative use of the object.Use the applicative type to make sure that objects can be loaded only where they can be accepted. If no applicative type is defined, any compatible content can be loaded into the object.
load_contextOptional string to define the serialization context used for the load operation.
Name Value type Default Description Comment
object_idobject identifieremptyIdentifier of the object to be loaded.All object types are supported: parameters, strings, groups, curves, surfaces, properties...
file_path_string_idstring idemptyThe identifier of the string object where the path to the file is stored.
root_pathstringemptyList of root directories for all paths, separated by ';'. Relative paths will be "absolutized" using these root paths until the file is found.
root_path_index_param_idemptyundocumented
applicative_typestringemptyOptional string to qualify the applicative use of the object.Use the applicative type to make sure that objects can be loaded only where they can be accepted. If no applicative type is defined, any compatible content can be loaded into the object.
load_contextstringemptyOptional string to define the serialization context used for the load operation.

Loads the content of a file into the selected object.

SaveObject brief detailed show all inherited

Name Description
object_idIdentifier of the object to be saved.All object types are supported: parameters, strings, groups, curves, surfaces, properties...
file_path_string_idThe identifier of the string object where the path to the file is stored.
root_pathList of root directories for all paths, separated by ';'. Relative paths will be "absolutized" using these root paths until the file can be saved.
applicative_typeOptional string to qualify the applicative use of the object.Use the applicative type to make sure that objects can be loaded only where they can be accepted. If no applicative type is defined, the file can be loaded into any compatible object.
save_contextOptional string to define the serialization context used for the save operation.
Name Value type Default Description Comment
object_idobject identifieremptyIdentifier of the object to be saved.All object types are supported: parameters, strings, groups, curves, surfaces, properties...
file_path_string_idstring idemptyThe identifier of the string object where the path to the file is stored.
root_pathstringemptyList of root directories for all paths, separated by ';'. Relative paths will be "absolutized" using these root paths until the file can be saved.
applicative_typestringemptyOptional string to qualify the applicative use of the object.Use the applicative type to make sure that objects can be loaded only where they can be accepted. If no applicative type is defined, the file can be loaded into any compatible object.
save_contextstringemptyOptional string to define the serialization context used for the save operation.

Saves the content of an object into a file.

Examples of saving and loading objects

With these four action types you can copy/paste or save/load values of parameters, strings and other objects (for example a "preset" within a section of a plugin). By combining string and parameters into a GROUP you can operate with all of them at once.

  1. <!-- actions to copy/paste, load/save objects -->
  2. <ACTION type="CopyObject"
  3. id="demo_CopyObject"
  4. object_id="demo_group"
  5. applicative_type=""
  6. copy_context=""
  7. name="Copy Object"
  8. />
  9. <ACTION type="PasteObject"
  10. id="demo_PasteObject"
  11. object_id="demo_group"
  12. applicative_type=""
  13. paste_context=""
  14. name="Paste Object"
  15. />
  16. <ACTION type="SaveObject"
  17. id="demo_SaveObject"
  18. object_id="demo_group"
  19. applicative_type=""
  20. file_path_string_id="demo_string_path"
  21. root_path=""
  22. root_path_index_param=""
  23. save_context=""
  24. name="Save Object"
  25. />
  26. <ACTION type="LoadObject"
  27. id="demo_LoadObject"
  28. object_id="demo_group"
  29. applicative_type=""
  30. file_path_string_id="demo_string_path"
  31. root_path=""
  32. load_context=""
  33. name="Load Object"
  34. />

  35. <!-- add some demo strings and parameters -->
  36. <STRING id="class" default="AmpSimulator"/>
  37. <STRING id="name" default="JCM-800" />
  38. <PARAM id="gain" min="0" max="12" default="10" />

  39. <!-- and put them into a group for easy save/load operation -->
  40. <!-- object_aliases attribute is optional -->
  41. <GROUP id="demo_group"
  42. object_ids="class;name;gain"
  43. object_aliases="the_class;the_name;the_gain"
  44. />

  45. <!-- now add some widgets to display data and buttons -->
  46. <WIDGET layout_type="row" spacing="10" background_color="#DDEEFF" margin="20" >
  47. <TEXT_EDIT_BOX string_id="class" width="110" />
  48. <TEXT_EDIT_BOX string_id="name" width="110" />
  49. <PARAM_TEXT_CONTROL param_id="gain"/>
  50. </WIDGET>

  51. <CELL height="20" /> <!-- add some vertical space -->

  52. <!-- display built-in system buttons -->
  53. <ROW>
  54. <SYSTEM_ACTION_BUTTON action_id="demo_CopyObject" width="150" />
  55. <SYSTEM_ACTION_BUTTON action_id="demo_PasteObject" width="150" />
  56. </ROW>
  57. <CELL height="10" /> <!-- add some vertical space -->
  58. <ROW>
  59. <SYSTEM_ACTION_BUTTON action_id="demo_SaveObject" width="150" />
  60. <SYSTEM_ACTION_BUTTON action_id="demo_LoadObject" width="150" />
  61. </ROW>

  62. <CELL height="10" /> <!-- add some vertical space -->

  63. <!-- string with filename to save object to -->
  64. <STRING id="demo_string_path" default="$_DIR_$test_SaveObject.txt" />
  65. <TEXT_FIELD string_id="demo_string_path" width="300" text_h_align="right" />

If you open the file where the object was saved to, you'll see something like this:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Export applicative_type="" data_type="{0779F8E6-34E0-4DA5-9307-ECC37BE0FA8A}">
  3. <content the_gain="10" the_name="JCM-900" the_class="AmpSim"/>
  4. </Export>

Note on "_context" attribute

It may have the same values as the persistence_context (see PARAM), or custom values, but that's not used yet. The idea is to make sure of what is saved. So if you have for example some data that has persistence_context="-Init" and in the copy_context you put "Init" then this data will not be saved. It just defines the saving/loading context. You could use your own keywords on both sides in fact.

OpenDirectory brief detailed show all inherited

Name Description
urlThe location of the file to open.
url_string_idIdentifier of the string object containing the file to open.When this attribute is set, the 'url' attribute is ignored.
Name Value type Default Description Comment
urlfile path or urlemptyThe location of the file to open.
url_string_idstring idemptyIdentifier of the string object containing the file to open.When this attribute is set, the 'url' attribute is ignored.

Open the directory containing the selected file in the file explorer of the system (Explorer on Windows and the Finder Mac).

  1. <!-- open directory -->
  2. <ACTION type="OpenDirectory"
  3. id="demo_OpenDirectory"
  4. url="$PLUGIN_DATA_PATH$"
  5. _url_string_id="can_use_string_id_instead_of_static_url"
  6. name="Open directory"
  7. />

  8. <!-- display a button -->
  9. <SYSTEM_ACTION_BUTTON action_id="demo_OpenDirectory" width="150" />

OpenUrl brief detailed show all inherited

Name Description
urlThe location of the resource to open.The result may depend on the system and the applications registered to open the file.
url_string_idIdentifier of the string object containing the file url to open.When this attribute is set, the 'url' attribute is ignored.
applicationName of the application to use to open the file.
application_string_idIdentifier of the string object containing the name of the application to use.When this attribute is set, the 'application' attribute is ignored.
root_pathList of root directories for all paths, separated by ';'. Relative paths will be "absolutized" using these root paths until the file is found.
Name Value type Default Description Comment
urlfile path or urlemptyThe location of the resource to open.The result may depend on the system and the applications registered to open the file.
url_string_idstring idemptyIdentifier of the string object containing the file url to open.When this attribute is set, the 'url' attribute is ignored.
applicationstringemptyName of the application to use to open the file.
application_string_idstring idemptyIdentifier of the string object containing the name of the application to use.When this attribute is set, the 'application' attribute is ignored.
root_pathstringemptyList of root directories for all paths, separated by ';'. Relative paths will be "absolutized" using these root paths until the file is found.

Open the selected url (may be a local file path or a web url) using the system shell.

  1. <!-- open URL in browser -->
  2. <ACTION type="OpenUrl" id="demo_OpenURL"
  3. url="https://www.letimix.com/"
  4. name="Open url"
  5. />

  6. <!-- open current file in Finder -->
  7. <ACTION type="OpenUrl" id="demo_OpenFileInFinder"
  8. url="$_FILE_$"
  9. _url_string_id="can_use_string_id_instead"
  10. application="Finder"
  11. _application_string_id="can_use_string_id_instead"
  12. name="Open file in Finder"
  13. />

  14. <!-- run a batch file on Windows -->
  15. <ACTION type="OpenUrl" id="demo_RunBatchFileOnWin"
  16. application="C:/Scripts/file.bat"
  17. url='"param 1" param2 "param 3"'
  18. name="Run batch file on Windows"
  19. />

  20. <!-- run bash script in Mac terminal -->
  21. <ACTION type="OpenUrl" id="demo_RunScriptInMacTerminal"
  22. url='/path/to/bash_script.sh" --env MY_VAR1="value123" -n -F --args "'
  23. application="Terminal"
  24. name="Run script in Mac Terminal"
  25. />

  26. <!-- display buttons -->
  27. <SYSTEM_ACTION_BUTTON action_id="demo_OpenURL" width="150" />
  28. <SYSTEM_ACTION_BUTTON action_id="demo_OpenFileInFinder" width="150" />
  29. <SYSTEM_ACTION_BUTTON action_id="demo_RunBatchFileOnWin" width="250" />
  30. <SYSTEM_ACTION_BUTTON action_id="demo_RunScriptInMacTerminal" width="250" />

As you can see this OpenURL action type is quite powerful. You can open documents and run various apps with it. On Windows you can execute a .bat file by simply passing it as an "application" name, and parameters in "url".

On Mac we have to use a trick to run a script in the Terminal. Here OpenURL seems to be executed like: open -a "application" "url". Using extra double quotes we can inject attributes to the command and add environmental variable to pass data to the bash script.

User interface

DisplayFileOpenDialog brief detailed show all inherited

Name DescriptionDefault
titleTitle of the dialog box.empty
file_path_string_idThe identifier of the string object where the chosen file path should be stored.empty
file_name_string_idString_id to get base file name without the extension and pathempty
file_typeswildcards list (semi-column separated) for file types accepted by the open dialog.Example: "*.txt;*.html"*.*
open_bundleson Mac, when set to true, the end user can browse inside bundles.false
default_pathdefault path (directory or file) to open if no file is already selected in the string pointed by file_path_string_id.empty
root_pathList of root directories for all paths, separated by ';'. Paths relative to one of these directories will be truncated and stored as relative sub-paths.empty
root_path_index_param_idParam_id to receive index of the root_path that was used.empty
applicative_typeOptional string to qualify the applicative use of the object.empty
result_param_idParam_id to keep the result of operation: 0 - not opened, 1 - openedempty
Name Value type Default Description Comment
titlestringemptyTitle of the dialog box.
file_path_string_idstring idemptyThe identifier of the string object where the chosen file path should be stored.
file_name_string_idstring idemptyString_id to get base file name without the extension and path
file_typesstring*.*wildcards list (semi-column separated) for file types accepted by the open dialog.Example: "*.txt;*.html"
open_bundlesbooleanfalseon Mac, when set to true, the end user can browse inside bundles.
default_pathstringemptydefault path (directory or file) to open if no file is already selected in the string pointed by file_path_string_id.
root_pathstringemptyList of root directories for all paths, separated by ';'. Paths relative to one of these directories will be truncated and stored as relative sub-paths.
root_path_index_param_idintegeremptyParam_id to receive index of the root_path that was used.
applicative_typestringemptyOptional string to qualify the applicative use of the object.
result_param_idintegeremptyParam_id to keep the result of operation: 0 - not opened, 1 - opened

Opens a standard system "file open" dialog box.

Simple example

  1. <!-- action to execute file open dialog -->
  2. <ACTION type="DisplayFileOpenDialog"
  3. id="demo_DisplayFileOpenDialog"
  4. title="Select *.txt file"
  5. file_path_string_id="path_to_selected_file"
  6. file_types="*.txt"
  7. open_bundles="false"
  8. default_path=""
  9. name="Open file (dialog)"
  10. />

  11. <!-- string to receive file path -->
  12. <STRING id="path_to_selected_file" />

  13. <!-- display a button -->
  14. <SYSTEM_ACTION_BUTTON action_id="demo_DisplayFileOpenDialog" width="150" />

  15. <!-- display result -->
  16. <TEXT_FIELD string_id="path_to_selected_file" width="200" />

Complex example

  1. <!-- action to execute file open dialog -->
  2. <ACTION type="DisplayFileOpenDialog"
  3. id="demo_DisplayFileOpenDialog"
  4. title="Select *.txt or *.pdf file"
  5. file_path_string_id="file_path"
  6. file_name_string_id="file_basename"
  7. file_types="*.txt;*.pdf"
  8. open_bundles="true"
  9. default_path=""
  10. root_path="/Volumes/A2/1;/Volumes/A2/2"
  11. root_path_index_param_id="selected_root_index"
  12. result_param_id="result"
  13. name="Open file (dialog)"
  14. />

  15. <!-- strings to receive file path and base name -->
  16. <STRING id="file_path" />
  17. <STRING id="file_basename" />

  18. <!-- params to receive selected root path index and result -->
  19. <PARAM id="selected_root_index" max="100" min="-1" default="-1" />
  20. <PARAM id="result" max="1" min="-1" default="-1" />

  21. <!-- display a button -->
  22. <SYSTEM_ACTION_BUTTON action_id="demo_DisplayFileOpenDialog" width="150" />

  23. <!-- display result strings and params -->
  24. <TEXT_FIELD string_id="file_path" width="200" />
  25. <TEXT_FIELD string_id="file_basename" width="200" />
  26. <PARAM_TEXT param_id="result" content="result: {value}"/>
  27. <PARAM_TEXT param_id="selected_root_index" content="root_index: {value}"/>

DisplayFileSaveDialog

Opens a standard system "file save" dialog box. Same as DisplayFileOpenDialog, except that the selected file path is not required to exist.

  1. <!-- action to execute file save dialog -->
  2. <ACTION type="DisplayFileSaveDialog"
  3. id="demo_DisplayFileSaveDialog"
  4. title="Choose file to save"
  5. file_path_string_id="file_path"
  6. file_name_string_id="file_basename"
  7. file_types="*.txt"
  8. open_bundles="true"
  9. default_path="$PLUGIN_DATA_PATH$/Skins"
  10. result_param_id="result"
  11. name="Save file (dialog)"
  12. />

  13. <!-- strings to receive file path and base name -->
  14. <STRING id="file_path" />
  15. <STRING id="file_basename" />

  16. <!-- param to receive result (1 - ok, 0 - not) -->
  17. <PARAM id="result" max="1" min="-1" default="-1" />

  18. <!-- display a button -->
  19. <SYSTEM_ACTION_BUTTON action_id="demo_DisplayFileSaveDialog" width="150" />

  20. <!-- display result strings and params -->
  21. <TEXT_FIELD string_id="file_path" width="200" />
  22. <TEXT_FIELD string_id="file_basename" width="200" />
  23. <PARAM_TEXT param_id="result" content="result: {value}"/>

DisplayFolderSelectDialog brief detailed show all inherited

Name Description
file_path_string_idThe identifier of the string object where the chosen file path should be stored.
root_pathList of root directories for all paths, separated by ';'. Paths relative to one of these directories will be truncated and stored as relative sub-paths.
Name Value type Default Description Comment
file_path_string_idstring idemptyThe identifier of the string object where the chosen file path should be stored.
root_pathstringemptyList of root directories for all paths, separated by ';'. Paths relative to one of these directories will be truncated and stored as relative sub-paths.

Opens a standard system dialog to select a folder.

  1. <!-- action to execute folder select dialog -->
  2. <ACTION type="DisplayFolderSelectDialog"
  3. id="demo_DisplayFolderSelectDialog"
  4. file_path_string_id="file_path"
  5. root_path="/Volumes/A2/"
  6. name="Select folder (dialog)"
  7. />

  8. <!-- strings to receive file path and base name -->
  9. <STRING id="file_path" />

  10. <!-- display a button -->
  11. <SYSTEM_ACTION_BUTTON action_id="demo_DisplayFolderSelectDialog" width="180" />

  12. <!-- display result strings and params -->
  13. <TEXT_FIELD string_id="file_path" width="200" />

DisplayMessageBox brief detailed show all inherited

Name DescriptionDefault
titleTitle of the dialog box.empty
messagemessage to be displayed in the message box.Example: "*.txt;*.html"empty
styletype of the system message box (info, warning, error, none)none
timeoutThe timeout specifies the number of milliseconds before the message box disappears.If no timeout is specified, the messagebox will not disappear until clicked.-1
button0Name of the first button.By default, message boxes have a single button named "Ok"Ok
button1Name of the second button.(optional)empty
button2Name of the third button.(optional)empty
button3Name of the fourth button.(optional)empty
buttonX_action_idAction to be executed when the user clicks on button XBy default, no action is executed, except closing the message box. X ranges from 0 to 3.empty
close_buttonaction of the window close button (Windows only)empty
result_param_ididentifier of a parameter where the result (Clicked button number) should be storedParameter range should be [-1;3] as the dialog may return -1 in case of timeout, or window close on windows.empty
Name Value type Default Description Comment
titlestringemptyTitle of the dialog box.
messagestringemptymessage to be displayed in the message box.Example: "*.txt;*.html"
styleinfo, warning, error, nonenonetype of the system message box (info, warning, error, none)
timeoutinteger-1The timeout specifies the number of milliseconds before the message box disappears.If no timeout is specified, the messagebox will not disappear until clicked.
button0stringOkName of the first button.By default, message boxes have a single button named "Ok"
button1stringemptyName of the second button.(optional)
button2stringemptyName of the third button.(optional)
button3stringemptyName of the fourth button.(optional)
buttonX_action_idaction idemptyAction to be executed when the user clicks on button XBy default, no action is executed, except closing the message box. X ranges from 0 to 3.
close_buttonbutton0, button1, button3, button4emptyaction of the window close button (Windows only)
result_param_idparam idemptyidentifier of a parameter where the result (Clicked button number) should be storedParameter range should be [-1;3] as the dialog may return -1 in case of timeout, or window close on windows.

Opens a standard system message box.

Examples of message box

  1. <!-- a simple message box -->
  2. <ACTION type="DisplayMessageBox"
  3. id="demo_DisplayMessageBox"
  4. title="Hello there"
  5. message="This goes away in 2 seconds"
  6. name="Simple message"
  7. timeout="2"
  8. />

  9. <!-- a message box with options -->
  10. <ACTION type="DisplayMessageBox"
  11. id="demo_DisplayMessageBoxExtended"
  12. title="Hello there"
  13. message="There was an error. What to do?"
  14. style="error"
  15. timeout="-1"
  16. button0="Nothing"
  17. button1="Fix it"
  18. button2="Display simple one"
  19. button3="Ignore"
  20. close_button="button3"
  21. result_param_id="msg_box_result"
  22. button2_action_id="demo_DisplayMessageBox"
  23. name="With buttons"
  24. />

  25. <!-- display built-in system buttons -->
  26. <ROW>
  27. <SYSTEM_ACTION_BUTTON action_id="demo_DisplayMessageBox" width="150" />
  28. <SYSTEM_ACTION_BUTTON action_id="demo_DisplayMessageBoxExtended" width="150" />
  29. </ROW>

  30. <!-- add a parameter to keep chosen button -->
  31. <PARAM id="msg_box_result" min="-1" max="100" default="-1" />
  32. <ROW margin="20">
  33. <PARAM_TEXT param_id="msg_box_result" content="result: {value}" />
  34. </ROW>

As you see, there are some options can customize for the message box. Yet there's no option for string_id (to change the text on the fly), but it may be added in the future.

Plug'n Script related

These action types can be used for creating your own skin for Plug'n Script.

DisplayPlugNScriptMenu brief detailed show all inherited

Name Description
script_file_name_string_idThe identifier of the string object where the filename of the selected script is stored.
Name Value type Default Description Comment
script_file_name_string_idstring idemptyThe identifier of the string object where the filename of the selected script is stored.

Displays script selection menu.

  1. <!-- open script selection menu -->
  2. <ACTION type="DisplayPlugNScriptMenu"
  3. id="demo_DisplayPlugNScriptMenu"
  4. script_file_name_string_id="filename"
  5. name="Script selection menu"
  6. />

  7. <!-- display a button -->
  8. <SYSTEM_ACTION_BUTTON action_id="demo_DisplayPlugNScriptMenu" width="180" />

  9. <!-- string to keep the filename -->
  10. <STRING id="filename" />

  11. <!-- display selected file -->
  12. <TEXT_FIELD string_id="filename" width="350" />

  13. <!-- where the full path is stored -->
  14. <TEXT string_id="$script_file_path$" width="350" text_h_align="right" />
  15. <TEXT value="$script_file_path$" width="350" />

ExportPlugNScriptPlugin brief detailed show all inherited

Name Description
plugin_id_string_idString holding unique 4-chars plugin id (eg. 'ab41'), used for AU and VST2.
plugin_guid_string_idString holding unique 32-chars plugin guid, used for VST3.
plugin_name_string_idString holding the name of the plugin.
plugin_manufacturer_string_idString holding the name of the manufacturer
plugin_manufacturer_id_string_idString holding the unique 4-chars manufacturer id (eg. 'sup1'), used for AU.
dsp_file_string_idString holding the script file path (AngelScript or C++).
dest_folder_string_idString holding the folder name where to export the plugin(s).
use_generic_params_param_idParam holding '1' to export with generic param names and ranges.
use_generic_skin_param_idParam holding '1' if you don't want to export the skin.
plugin_type_param_idParam holding the type of a plugin (0 - AudioEffect, 1 - Instrument, 2 - MidiEffect)
enable_meters_param_idParam holding '1' to enable meters in the exported plugin (0 to lower CPU).
enable_encryption_param_idParam holding '1' if you want to encrypt AngelScript upon export.
result_param_idParam receiving the result of the export operation.
io_config_path_string_idString holding the selected I/O config for the plugin.
io_config_root_pathPath to the folder with I/O configs.
log_path_string_idString holding the export log.
temp_path_string_idString holding the temporary folder.
Name Value type Default Description Comment
plugin_id_string_idstring idemptyString holding unique 4-chars plugin id (eg. 'ab41'), used for AU and VST2.
plugin_guid_string_idstring idemptyString holding unique 32-chars plugin guid, used for VST3.
plugin_name_string_idstring idemptyString holding the name of the plugin.
plugin_manufacturer_string_idstring idemptyString holding the name of the manufacturer
plugin_manufacturer_id_string_idstring idemptyString holding the unique 4-chars manufacturer id (eg. 'sup1'), used for AU.
dsp_file_string_idstring idemptyString holding the script file path (AngelScript or C++).
dest_folder_string_idstring idemptyString holding the folder name where to export the plugin(s).
use_generic_params_param_idparam idemptyParam holding '1' to export with generic param names and ranges.
use_generic_skin_param_idparam idemptyParam holding '1' if you don't want to export the skin.
plugin_type_param_idparam idemptyParam holding the type of a plugin (0 - AudioEffect, 1 - Instrument, 2 - MidiEffect)
enable_meters_param_idparam idemptyParam holding '1' to enable meters in the exported plugin (0 to lower CPU).
enable_encryption_param_idparam idemptyParam holding '1' if you want to encrypt AngelScript upon export.
result_param_idparam idemptyParam receiving the result of the export operation.
io_config_path_string_idstring idemptyString holding the selected I/O config for the plugin.
io_config_root_pathstringemptyPath to the folder with I/O configs.
log_path_string_idstring idemptyString holding the export log.
temp_path_string_idstring idemptyString holding the temporary folder.

Executes export of the script as a separate plugin. To get the better understanding of the plugin export process you can examine BCA Skin or LM Skin.

  1. <ACTION type="ExportPlugNScriptPlugin"
  2. id="do_ExportPlugin"
  3. name="Build the plugin!"
  4. plugin_id_string_id="plugin_id"
  5. plugin_guid_string_id="plugin_guid"
  6. plugin_name_string_id="plugin_name"
  7. plugin_manufacturer_string_id="plugin_manufacturer"
  8. plugin_manufacturer_id_string_id="plugin_manufacturer_id"
  9. dsp_file_string_id="$script_file_path$"
  10. dest_folder_string_id="dest_path"
  11. use_generic_params_param_id="use_generic_params"
  12. use_generic_skin_param_id="use_default_gui"
  13. plugin_type_param_id="plugin_type"
  14. enable_meters_param_id="enable_meters"
  15. enable_encryption_param_id="encrypt_dsp_script"
  16. result_param_id="export_result"
  17. io_config_path_string_id="selected_io_config"
  18. io_config_root_path="$PLUGIN_DATA_PATH$/Resources/Settings/ioconfig"
  19. log_path_string_id="export_log_path"
  20. temp_path_string_id="export_temp_path"
  21. />

GeneratePlugNScriptGUID brief detailed show all inherited

Name Description
string_idThe identifier of the string object where the generated string would be stored.
Name Value type Default Description Comment
string_idstring idemptyThe identifier of the string object where the generated string would be stored.

Generates unique GUID string. Used for generating a unique ID for plugin when exporting, you can use it for other purposes as well.

  1. <!-- action to generate unique ID -->
  2. <ACTION type="GeneratePlugNScriptGUID"
  3. id="demo_GeneratePlugNScriptGUID"
  4. string_id="new_id"
  5. name="Generate GUID"
  6. />

  7. <!-- string to keep the generated id -->
  8. <STRING id="new_id" />

  9. <!-- display result -->
  10. <PARAM_TEXT param_id="new_id.length" content="length: {value} chars" value_format="0.0" />
  11. <TEXT_FIELD string_id="new_id" width="350" />

  12. <!-- display a button -->
  13. <SYSTEM_ACTION_BUTTON action_id="demo_GeneratePlugNScriptGUID" width="180" />

2020 © Plug'n Script and KUIML by Blue Cat Audio  |  Site by LetiMix