Get_open_filenames - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
Description
Displays a multi-select "open file" dialog box. filter has the form 'name1|mask1|name2|mask2a;mask2b' where a typical mask is '*.ext'.
Parameters
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. |
Return Values
string: Returns the selected absolute path and file name to every file selected, separated by a new line.
Example Call
// 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