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.
# Selecting a filename from a dialog box.
pixels = 0
total = 0
$ourfile = "*.img"
getfile $ourfile "Select an image file to process"
pixels = pixels + 1
total = total + ina
avg = total / pixels
pause "Pixels: " pixels " Average: " avg
See Also: NEXTFILE