User interaction

This page describes global functions that allow you to interact with the user.

Global functions

create_progress_dialog(message as String, title as String, count as Integer)

Create a progress dialog with the provided message and title, set up for count elements. You must update the value of the dialog using update_progress_dialog().

See also: update_progress_dialog()


update_progress_dialog(value as Integer)

Update the progress dialog to the provided value. If value equals the progress dialog’s count, the dialog is closed. The first value that should be provided to this function is 1, and the last one is the number of elements passed to the dialog when it was created.

See also: create_progress_dialog()


warning(message[, title])

Displays a warning dialog.

See also: alert()


alert(message[, title])

Displays an error dialog. This can be used for critical errors.

See also: warning()


info(message[, title])

Displays an information dialog.


ask(message[, title])

Asks a Yes/No question to the user. Returns true of the user clicked Yes, and false otherwise.


get_input(label, title, text)

Displays an input dialog whose title is title and whose informative text is label. The dialog contains a field whose value is text. This function returns the content of the field.


open_file_dialog(message)

Displays a dialog that lets the user select a file.

See also: save_file_dialog(), open_directory_dialog()


save_file_dialog(message)

Displays a dialog that lets the user choose a path to save a file.

See also: open_file_dialog(), open_directory_dialog()


open_directory_dialog(message)

Displays a dialog that lets the user select a directory.

See also: save_file_dialog(), open_file_dialog()


view_text(path, title)

Opens the plain text file path in a new dialog with the given title.


clear()

Clears the currently active output surface. When called interactively from the console, it empties the console and prints a new prompt. When called from a script run through the script view, it empties the Output panel instead.

This is the zero-argument overload of clear; the one-argument overloads that empty a List, Table, Array or Set are documented on their respective pages.