-
Notifications
You must be signed in to change notification settings - Fork 0
Get_open_filenames
hugh greene edited this page Jun 20, 2022
·
1 revision
Displays a multi-select "open file" dialog box. filter has the form 'name1|mask1|name2|mask2a;mask2b' where a typical mask is '*.ext'.
Parameter | Description |
---|---|
filter | The file filters to use. Some widget systems only support one filter, such as OsaScript and KDailog. Each file filter can support multiple masks. |
fname | The default filename to display in the dialog's text box. Can also be a directory if you want the dialog to open to a specific folder on initialization. |
string: Returns the selected absolute path and file name to every file selected, separated by a new line.
// This example prompts the user to select sprite images and displays a message box with the files selected as the message. Errors on cancel.
fnames = get_open_filenames("Supported Sprite Image Formats (*.png *.jpg *.jpeg *.gif)|*.png;*.jpg;*.jpeg;*.gif", "");
if (fnames != "") {
show_message(fnames);
} else {
show_error("No files selected!", false);
}
NOTOC
edited by hpg678 on Github