Global Mapper v25.0

Running from command line immediately returns

gilbertdr
gilbertdr Global Mapper User
edited January 2012 in GM Script Language
Hi.

I'm playing around with running Global Mapper from the command line w/ a .gms file. The documentation states that "the script file will be run with no user interface displayed and Global Mapper will immediately exit when the script file completes processing."

However, when I run a test script which simply imports a geotiff and then exports to KML control immediately returns to the command prompt even though a globalmapper.exe process is still running and doing it's thing. In order to batch up some processing among multiple CPUs I need to know when a script completes before kicking off another job.

Am I missing something obvious? Or am I just wrong in the assumption that control *shouldn't* return to the command prompt until the process has finished?

Thanks,

-- Dan

Comments

  • global_mapper
    global_mapper Administrator
    edited January 2012
    Dan,

    You will have to add something to wait for the Global Mapper application to complete, like the following:

    Start /wait "c:\Program Files\GlobalMapper13\global_mapper13.exe" my_script.gms

    This should start Global Mapper and make sure it returns before continuing on in the script.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • gilbertdr
    gilbertdr Global Mapper User
    edited January 2012
    Mike,

    Your suggestion worked like a charm. Thank you so much for the quick reply.

    -- Dan
  • gghiggini
    gghiggini Global Mapper User
    I am using GM 20
    If I use Start before running the GM.exe and script then win10 asks me what app to use and I have to select GlobalMapper from a list.
    If I do not use Start then Global mapper does not close at the end of the script process and I am obliged to close it manually to permit the batch to proceed with the next step.
    Any suggestion?
    Giorgio
  • bmg_bob
    bmg_bob Global Mapper Programmer
    gghiggini said:
    I am using GM 20
    If I use Start before running the GM.exe and script then win10 asks me what app to use and I have to select GlobalMapper from a list.
    If I do not use Start then Global mapper does not close at the end of the script process and I am obliged to close it manually to permit the batch to proceed with the next step.
    Any suggestion?
    Giorgio
    Hello,

    Could you post the text of the Start command you are using?

    Cheers,
    Bob