Global Mapper v25.0

DEFINE_VAR VALUE issue

Hello!
I am trying to prompt users to select a filename/directory to save a file so I can save it in a variable and use it within my script.
I would like the default location to be the folder of the script itself, however this is not working as expected when I have "FILE_MUST_EXIST=NO".

DEFINE_VAR NAME="GRID_FILE_TO_SAVE" PROMPT="FILE" VALUE="%SCRIPT_FOLDER%XX_NADXX_%FNAME_PARENT_DIR%.gmg" ABORT_ON_CANCEL=YES FILE_MUST_EXIST=NO PROMPT_TEXT="Select a folder and filename to save the grid file"

When I change it to "FILE_MUST_EXIST=YES" it shows the correct folder. I guess the only difference is the "save as" vs the "open file" dialog windows. I don't want users to be confused when they see "open file", when they are trying to save one.
Any ideas why this is not working?
Thanks
Tagged:

Answers

  • Actually, when FILE_MUST_EXIST=YES it doesn't let me create a new file, it requires an existing file for sure.