Bringing-Up-a-Dialog
X-Functions whose names begin with dlgdialog may be called in your scripts to facilitate dialog-based interaction.
Possibly the most common such operation is to select a file from a directory. The following line of script brings up a dialog that pre-selects the PDF file extension (group), and starts at the given path location (init):
dlgfile group:=*.pdf init:="C:\MyData\MyPdfFiles"; type %(fname$); // Outputs the selected file path to Script Window
The complete filename of the file selected in the dialog, including path, is stored in the variable fname$. If init is left out of the X-Function call or cannot be found, the dialog will start in the User Files folder.
The dlgsave X-Function works for saving a file using a dialog.
dlgsave ext:=*.ogs; type %(fname$); // Outputs the saved file path to Script Window
The type.remind() method provides another way to open a dialog for user interaction. This method creates a private reminder message dialog. An Ini file is used to initialize the dialog. Each section in the ini file is used for a single message. The same functionality can be created in Origin C using the global function PrivateReminderMessage.
For more information, see type.remind().