KUIML
Blue Cat's User Interface Programming Language
Built-In Action Types

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

Manufacturers may register additionnal custom action types to this list. Please refer to the documentation of the software for more information about additional actions that may be available.

General Purpose

Script

Executes a script defined with the script attribute.

Name Value Type Default Value Description Comment V. Exp.

script

script

Empty.

The script to be executed.

This is not the path to the script file but the actual script to be executed. For example: "DoStuff();"

2.0

No

requires

list of ';' separated identifiers or wildcards

Empty.

List of objects expected by the script.

Forces the KUIML engine to expose the listed objects to the scripting engine.

2.0

No

Sequence

Executes a sequence of actions defined as a list of action identifiers.

Name Value Type Default Value Description Comment V. Exp.

action_ids

list of ';' separated identifiers

Empty.

List of actions to execute.

The actions will be executed in order. Example: "DoStuff1;DoStuff2"

2.7.3

No

System

CopyObject

Copies the selected object into the system cliboard.

Name Value Type Default Value Description Comment V. Exp.

object_id

object identifier

Empty

Identifier of the object to be stored into the clipboard.

All object types are supported: parameters, strings, groups, curves, surfaces, properties...

2.5

No

applicative_type

string

Empty.

Optional 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.

2.5

No

copy_context

string

Empty.

Optional string to define the serialization context used for the copy operation.

2.5

No

PasteObject

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

Name Value Type Default Value Description Comment V. Exp.

object_id

object identifier

Empty

Identifier of the object to be pasted from the clipboard.

All object types are supported: parameters, strings, groups, curves, surfaces, properties...

2.5

No

applicative_type

string

Empty.

Optional 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.

2.5

No

paste_context

string

Empty.

Optional string to define the serialization context used for the paste operation.

2.5

No

LoadObject

Loads the content of a file into the selected object.

Name Value Type Default Value Description Comment V. Exp.

object_id

object identifier

Empty

Identifier of the object to be loaded.

All object types are supported: parameters, strings, groups, curves, surfaces, properties...

2.5

No

file_path_string_id

string id

Empty.

The identifier of the string object where the path to the file is stored.

2.5

No

root_path

string

Empty

List of root directories for all paths, separated by ';'. Relative paths will be "absolutized" using these root paths until the file is found.

2.5

No

applicative_type

string

Empty.

Optional 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.

2.5

No

load_context

string

Empty.

Optional string to define the serialization context used for the load operation.

2.5

No

SaveObject

Saves the content of an object into a file.

Name Value Type Default Value Description Comment V. Exp.

object_id

object identifier

Empty

Identifier of the object to be saved.

All object types are supported: parameters, strings, groups, curves, surfaces, properties...

2.5

No

file_path_string_id

string id

Empty.

The identifier of the string object where the path to the file is stored.

2.5

No

root_path

string

Empty

List of root directories for all paths, separated by ';'. Relative paths will be "absolutized" using these root paths until the file can be saved.

2.5

No

applicative_type

string

Empty.

Optional 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.

2.5

No

save_context

string

Empty.

Optional string to define the serialization context used for the save operation.

2.5

No

OpenDirectory

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

Name Value Type Default Value Description Comment V. Exp.

url

file path or url

Empty.

The location of the file to open.

2.0

No

url_string_id

string id

Empty.

Identifier of the string object containing the file to open.

When this attribute is set, the 'url' attribute is ignored.

2.0

No

root_path

string

Empty

List of root directories for all paths, separated by ';'. Relative paths will be "absolutized" using these root paths until the file is found.

2.4

No

OpenUrl

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

Name Value Type Default Value Description Comment V. Exp.

url

file path or url

Empty.

The location of the resource to open.

The result may depend on the system and the applications registered to open the file.

1.9.1

No

url_string_id

string id

Empty.

Identifier of the string object containing the file url to open.

When this attribute is set, the 'url' attribute is ignored.

1.9.1

No

application

string

Empty.

Name of the application to use to open the file.

2.0

No

application_string_id

string id

Empty.

Identifier of the string object containing the name of the application to use.

When this attribute is set, the 'application' attribute is ignored.

1.9.1

No

root_path

string

Empty

List of root directories for all paths, separated by ';'. Relative paths will be "absolutized" using these root paths until the file is found.

2.5

No

LoadUrl (Experimental)

Download the selected url (web url only) into a string or file asynchronously (not blocking). Supports http and https protocols. Currently experimental and may be modified in the future. Error handling is currently minimal.

Name Value Type Default Value Description Comment V. Exp.

url_string_id

string id

Empty.

Identifier of the string object containing the file url to open.

Mandatory.

2.7.3

No

body_response_string_id

string id

Empty.

Optional identifier of the string object to receive the content of the url.

If the url contains binary data or strings encoded in anything else than utf-8, the string will be filled with truncated data. For binary data, use a file to download the content instead.

2.7.3

No

response_headers_string_id

string id

Empty.

Optional identifier of the string object to receive the http headers returned by the server.

2.7.3

No

response_file_path_id

string id

Empty.

Optional identifier of the string object containing the file path to receive the content returned by the server (file download).

2.7.3

No

response_url_string_id

string id

Empty.

Optional identifier of the string object to get the actual url (that may be different from the original url in case of redirects).

2.7.3

No

response_status_param_id

param id

Empty.

Optional identifier of the parameter object to receive the http status returned by the server.

2.7.3

No

cancel_event_id

event id

Empty.

Optional identifier of the event that cancels the request when fired.

2.7.3

No

follow_redirects

boolean

true

Can be used to disable redirections - redirect may be handled manually by inspecting the received headers.

2.7.3

No

User Interface

DisplayFileOpenDialog

Opens a standard system "file open" dialog box.

Name Value Type Default Value Description Comment V. Exp.

title

string

Empty

Title of the dialog box.

2.0

No

file_path_string_id

string id

Empty.

The identifier of the string object where the chosen file path should be stored.

1.9.1

No

file_types

string

*.*

wildcards list (semi-column separated) for file types accepted by the open dialog.

Example: "*.txt;*.html"

1.9.1

No

open_bundles

boolean

false

on Mac, when set to true, the end user can browse inside bundles.

1.9.2

No

default_path

string

Empty

default path (directory or file) to open if no file is already selected in the string pointed by file_path_string_id.

2.0

No

root_path

string

Empty

List of root directories for all paths, separated by ';'. Paths relative to one of these directories will be truncated and stored as relative sub-paths.

2.0

No

DisplayFileSaveDialog

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

DisplayFolderSelectDialog

Opens a standard system dialog to select a folder.

Name Value Type Default Value Description Comment V. Exp.

file_path_string_id

string id

Empty.

The identifier of the string object where the chosen file path should be stored.

2.0

No

root_path

string

Empty

List of root directories for all paths, separated by ';'. Paths relative to one of these directories will be truncated and stored as relative sub-paths.

2.0

No

DisplayMessageBox

Opens a standard system message box.

Name Value Type Default Value Description Comment V. Exp.

title

string

Empty

Title of the dialog box.

2.0

No

message

string

Empty

message to be displayed in the message box.

Example: "*.txt;*.html"

1.9.1

No

style

info, warning, error, none

none

type of the system message box.

1.9.1

No

timeout

integer

-1

The timeout specifies the number of milliseconds before the message box disappears.

If no timeout is specified, the messagebox will not disappear until clicked.

1.9.1

No

button0

string

Ok

Name of the first button.

By default, message boxes have a single button named "Ok"

1.9.1

No

button1

string

Empty

Name of the second button.

(optional)

1.9.1

No

button2

string

Empty

Name of the third button.

(optional)

1.9.1

No

button3

string

Empty

Name of the fourth button.

(optional)

1.9.1

No

buttonX_action_id

action id

Empty

Action to be executed when the user clicks on button X

By default, no action is executed, except closing the message box. X ranges from 0 to 3.

1.9.1

No

close_button

button0, button1, button3, button4

Empty

action of the window close button

Windows only

1.9.1

No

result_param_id

param id

Empty

identifier of a parameter where the result (Clicked button number) should be stored

Parameter range should be [-1;3] as the dialog may return -1 in case of timeout, or window close on windows.

1.9.1

No