New to loop script
mangre
Global Mapper User
I have a large number of export raster .gms scripts in a folder.
Would anyone have a loop script that could run these sets of .gms scripts, and save the results to the same folder.
Thanks
Paul
Would anyone have a loop script that could run these sets of .gms scripts, and save the results to the same folder.
Thanks
Paul
Answers
-
Hello,
You can use the DIR_LOOP_START command to loop through your script files, and the EMBED_SCRIPT command to run the scripts.
Cheers,
Bob -
Hi Bob,
That did what I have been trying to achieve.for so long. The scripts from 1 through to 15 which are Export Raster scripts. are now looping.. thanks.
The only problem I have is once I get to 15, it re starts the loop again at 1 through to 15 again.
Any suggestions, I have attached my script.
Cheers
Paul.
GLOBAL_MAPPER_SCRIPT VERSION=1.00
DIR_LOOP_START DIRECTORY="C:\Users\paul\AA GLOBAL MAPPER SCRIPTS\A WATER_COLOR SCRIPT\"
EMBED_SCRIPT FILENAME="FILE 1.GMS"
EMBED_SCRIPT FILENAME="FILE 2.GMS"
EMBED_SCRIPT FILENAME="FILE 3.GMS"
EMBED_SCRIPT FILENAME="FILE 4.GMS"
EMBED_SCRIPT FILENAME="FILE 5.GMS"
EMBED_SCRIPT FILENAME="FILE 6.GMS"
EMBED_SCRIPT FILENAME="FILE 7.GMS"
EMBED_SCRIPT FILENAME="FILE 8.GMS"
EMBED_SCRIPT FILENAME="FILE 9.GMS"
EMBED_SCRIPT FILENAME="FILE 10.GMS"
EMBED_SCRIPT FILENAME="FILE 11.GMS"
EMBED_SCRIPT FILENAME="FILE 12.GMS"
EMBED_SCRIPT FILENAME="FILE 13.GMS"
EMBED_SCRIPT FILENAME="FILE 14.GMS"
EMBED_SCRIPT FILENAME="FILE 15.GMS"
DIR_LOOP_END
-
I should of placed unload all.
Working perfect...
Thanks
Paul
-
Hi Bob,
I have created a .gmw script that opens my saved .gmw Map ,and then within this script a DIR_LOOP_START DIRECTORY through the scripts EMBED_SCRIPT FILENAME="FILE 9.GMS" as shown in my previous post.
This works well.
But if I I create a task with triggers in windows task scheduler to start at a specific time. it will not work at all
I then created .bat file to open the .gmw script and run, I tested this and worked fine, I passed this to windows task scheduler to test. This did open the save script and opened .gmw map, but will not start the DIR_LOOP_START DIRECTORY command to run the EMBED_SCRIPT FILENAME to complete the full script.
This has me scratching my head as it works fine otherwise.
Any help here would be appreciated.
Cheers
Paul
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website