GETFILE

Purpose: Allows the user to select a filename from a dialog box and assigns the selection to a text variable.

Format:    GETFILE   variable name   " Text String "

Notes:      variable name is the 8 character name of the variable to contain the filename selection.  A   '$'  character must precede the variable name. The second parameter (optional) contains the text to be printed with the file selection dialog box.  If the specified  variable name  is assigned a filename (including wildcards) prior to the  GETFILE  statement then that filename will become the initial default selection.

Example:

# Selecting a filename from a dialog box.

pixels = 0
total = 0

$ourfile = "*.img"
getfile $ourfile "Select an image file to process"

infile_a $ourfile

process begin
 pixels = pixels + 1
 total = total + ina
process end

avg = total / pixels
pause "Pixels: " pixels "   Average: " avg
exit

See Also:  NEXTFILE