Scripting
Dialogs and Notifications
The application offers the following dialogs and notifications:
- Notification
- Error
- Pop-Up with OK and Cancel
- Pop-Up with Custom Answers
Additionally, elements within the application can be shown and hidden.
Notifications
A simple notification can be created with the following code:
runtime.shownotification('This is a notification message with 5 seconds duration.', notifieroptions.formessages(5000))
Error Messages
For an error message, adjust the code as follows:
runtime.shownotification('This is an error message with 10 seconds duration.', notifieroptions.forerrormessages(10000))
Standard Pop-Up
A standard pop-up can be created with the following line of code:
runtime.showdialog('Simple Pop-Up Header', 'Simple Pop-Up Body Text.')
Custom Pop-Up
For a custom pop-up, it is necessary to define two functions beforehand, which will be triggered based on the selection within the pop-up.
The code for this pop-up is as follows:
runtime.showdialog('Pop-Up with Custom Answers Header', 'Pop-Up with Custom Answers Body. You can attach your own functions to the buttons below and change their text.', 'I agree', 'I decline', AgreeFunction, DisagreeFunction)
Controlling Element Visibility
To control the visibility of various elements within the application, the following code can be used:
if screens['Screen1'].groups['Group2'].visible then
screens['Screen1'].groups['Group2'].hide()
else
screens['Screen1'].groups['Group2'].show()
end