From the dictionary entry for answer file:
The absolute file path of the file the user chose is placed in the it variable. If the answer files form is used, a return-delimited list of such paths is placed in the it variable. If the user cancels the dialog, the it variable is set to empty, and the result function returns "Cancel".
So I added the following code with a trap for when the user presses cancel:
Code: Select all
-Prompt for input file
answer file "Select the TAB file that describes the" & pListName & " init data" with type "Text|txt"
--? this next line does not work
if the result is "Cancel" then exit LoadDescriptionFile