GetFiles

Description:

baGetFiles displays a files dialog box and returns the files selected.

Platforms:

Windows and Macintosh

Usage:

Result = baGetFiles( StartDir, FileSpec, SelectedFile, Title, Instruction, Flags, X, Y )

Arguments:

String, string, string, string, integer, integer, integer.
StartDir is the folder containing the files.
Filespec is the type of files to display. Use "" or "*.*" to show all files.
Filename is the name of the file to be selected when the dialog opens.
Title is the tile of the dialog.
Instruction is an instruction text to display.
Flags modifies the behaviour of the dialog.
X is horizontal position of the dialog.
Y is the vertical position of the dialog.

Returns:

String or List.
Returns the file name selected, or "" if the user cancelled.
If the Multiselect option is used, the return will be a list of the file selected.

Examples:

Director:
files = baGetFiles( the moviePath & "images", "*.jpg", "", "My program", "Select pictures to import", 3, 100, 100 )

Authorware:
files := baGetFiles( FileLocation ^ "images", "*.jpg", "", "My program", "Select pictures to import", 3, 100, 100 )
 

Notes:

On Windows, The FileSpec is a standard DOS wildcard string. Use an empty string to show all files.

The X and Y values are the number of pixels from the top left corner of the screen. Set X to -1 to position the dialog in the center of the calling Director/Authorware window. Set X to -2 to position the dialog in the center of the screen.

The flags argument allows you to change the way the dialog box looks and behaves. It can be the combination of any of these values:

1

GF_MULTISELECT
The dialog box allows multiple selections.
The return will always be a list.

2

GF_SIMPLESELECT Windows only
Allows the user to select multiple files without needing to use the Shift and Control keys.
The return will always be a list.

4

GF_RETURNASLIST
Returns the files selected as a list.

8

GF_SHOWHIDDEN
Shows hidden files in the dialog list. By default, hidden files are not displayed.

16

GF_SHOWBUNDLES Macintosh only
Include bundles in the list.

See also:

baGetFilename
baGetFolder
baGetDisk
 

/td>