1 REM USAGE: geany-run-helper AUTOCLOSE COMMAND...
\r
3 REM save autoclose option and remove it
\r
8 REM it's tricky because shift doesn't affect %*, so hack it out
\r
9 REM https://en.wikibooks.org/wiki/Windows_Batch_Scripting#Command-line_arguments
\r
12 if -%1-==-- goto argloop_end
\r
13 set SPAWN=%SPAWN% %1
\r
22 echo:------------------
\r
23 echo:(program exited with code: %ERRORLEVEL%)
\r
26 REM and if wanted, wait on the user
\r
27 if not %autoclose%==1 pause
\r