exprv4:reference:functions:dialogs_clipboard_platform_paths




Dialogs, Clipboard, Platform, and Path Functions

These functions interact with the host environment.


from_clipboard()

Reads text from the system clipboard.

Argument Type Description
none No arguments.

Returns: string.

Example:

text = from_clipboard();

msg_ok(value, ...)

Shows an OK message dialog.

Argument Type Description
`value` any First value appended to the message. Optional.
`…` any Additional values appended to the message.

Returns: numeric dialog result code.

Example:

msg_ok('Operation complete');

msg_ok_cancel(value, ...)

Shows an OK/Cancel message dialog.

Argument Type Description
`value` any First value appended to the message. Optional.
`…` any Additional values appended to the message.

Returns: numeric dialog result code.

Example:

result = msg_ok_cancel('Continue?');

msg_yes_no(value, ...)

Shows a Yes/No message dialog.

Argument Type Description
`value` any First value appended to the message. Optional.
`…` any Additional values appended to the message.

Returns: numeric dialog result code.

Example:

result = msg_yes_no('Use current position?');

msg_yes_no_cancel(value, ...)

Shows a Yes/No/Cancel message dialog.

Argument Type Description
`value` any First value appended to the message. Optional.
`…` any Additional values appended to the message.

Returns: numeric dialog result code.

Example:

result = msg_yes_no_cancel('Save changes?');

path()

Returns the current profile path.

Argument Type Description
none No arguments.

Returns: string.

Example:

profilePath = path();

path(relativePath)

Resolves a path through the host profile path rules.

Argument Type Description
`relativePath` any Path text. Relative paths are resolved against the current include path or source path.

Returns: string.

Example:

filePath = path('scripts/probe.expr');

platform()

Returns a string identifying the platform.

Argument Type Description
none No arguments.

Returns: string: `windows`, `linux`, `apple`, `arm`, or `unknown`.

Example:

if(platform() == 'windows')
{
    print('Running on Windows');
};

to_clipboard(value)

Writes text to the system clipboard.

Argument Type Description
`value` any Value converted to string and copied to clipboard.

Returns: boolean-style result from the host clipboard operation.

Example:

to_clipboard('Copied text');

Previous: Output, Formatting, and Errors

Next: Methods and properties

exprv4/reference/functions/dialogs_clipboard_platform_paths.txt · Last modified: by 127.0.0.1

Page Tools