get_open_filenames_ext(filter,fname,dir,title))

From ENIGMA
Jump to navigation Jump to search

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.
fname The default filename to display in the dialog's text box.
dir The default directory to display when the dialog has initialized.
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);
}