Get_open_filenames_ext - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
Description
Displays an 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. |
dir | The default directory to display when the dialog has initialized, if fname lists a file name and not a directory. |
title | The title of the dialog box in the window caption. |
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_filename_ext("Supported Sprite Image Formats (*.png *.jpg *.jpeg *.gif)|*.png;*.jpg;*.jpeg;*.gif", "", working_directory, "Select Sprite Image Files");
if (fnames != "") {
show_message(fnames);
} else {
show_error("No files selected!", false);
}
NOTOC