imacros - create a batch file to open firefox, then run a macro (wait for it to finish) then run another macro -


i trying to: (1) load firefox (2) run iopus imacro (.iim) - wait finish, (3) run next macro.

so far have tried start /wait - call , many other suggestions find on internet , have far (which runs flawlessly - long there 1 macro file (.iim) play):

@echo on echo echo have 5 sec close window prevent macro running... timeout 5 echo start firefox , wait 10 seconds... start /b "" "c:\program files (x86)\mozilla firefox\firefox.exe" timeout 10 echo running macro (in 2nd tab)... "c:\program files (x86)\mozilla firefox\firefox.exe" imacros://run/?m="mymacro1.iim"  rem macro execution completed echo finished! 

when try add more files run, this:

@echo on echo echo have 5 sec close window prevent macro running... timeout 5 echo start firefox , wait 10 seconds... start /b "" "c:\program files (x86)\mozilla firefox\firefox.exe" timeout 10 echo running macro (in 2nd tab)... "c:\program files (x86)\mozilla firefox\firefox.exe" imacros://run/?m="mymacro1.iim" "c:\program files (x86)\mozilla firefox\firefox.exe" imacros://run/?m="mymacro2.iim"     "c:\program files (x86)\mozilla firefox\firefox.exe" imacros://run/?m="mymacro3.iim"  rem macro execution completed echo finished! 

firefox starts , loads of .iim files @ once, none of them run.

i tried creating more 1 batch file, 1 run, call second 1 when 1st 1 finished ... didn't work!

this code launch-macros-one-by-one-from-a-batch-file

cd c:\program files (x86)\mozilla firefox\ start firefox.exe ping -n 05 127.0.0.1>null start /wait firefox.exe imacros://run/?m=unlimited1.iim start /wait firefox.exe imacros://run/?m=unlimited2.iim 

started 2 firefox windows did not run macros!

@foxdrive - here code mentioned in comments @ 9pm or ....

`@echo on echo echo have 5 sec close window prevent macro running... timeout 5 echo start firefox , wait 10 seconds... start /b "" "c:\program files (x86)\mozilla firefox\firefox.exe" timeout 10 echo running macro (in 2nd tab)... set "tempfile=c:\users\public\documents\imacros\macros\flag.txt" type nul>"%tempfile%"     "c:\program files (x86)\mozilla firefox\firefox.exe" "imacros://run/?m="mymacro1.iim" :loop1 if exist "%tempfile%" ping -n 10 localhost >nul & goto :loop1  type nul>"%tempfile%"     "c:\program files (x86)\mozilla firefox\firefox.exe" "imacros://run/?m="mymacro2.iim"    :loop2 if exist "%tempfile%" ping -n 10 localhost >nul & goto :loop2  type nul>"%tempfile%"     "c:\program files (x86)\mozilla firefox\firefox.exe" "imacros://run/?m="mymacro3.iim" :loop3 if exist "%tempfile%" ping -n 10 localhost >nul & goto :loop3  rem macro execution completed echo finished!`   

now macros delete temp file when finish, should work:

@echo off echo have 5 sec close window prevent macro running... timeout 5 echo start firefox , wait 10 seconds... start /b "" "c:\program files (x86)\mozilla firefox\firefox.exe" timeout 10 set "tempfile=c:\users\public\documents\imacros\macros\flag.txt" echo macro 1 running type nul>"%tempfile%"     start "" /w /b "c:\program files (x86)\mozilla firefox\firefox.exe" imacros://run/?m="mymacro1.iim" :loop1 if exist "%tempfile%" ping -n 10 localhost >nul & goto :loop1 echo macro 2 running type nul>"%tempfile%"     start "" /w /b "c:\program files (x86)\mozilla firefox\firefox.exe" imacros://run/?m="mymacro2.iim"     :loop2 if exist "%tempfile%" ping -n 10 localhost >nul & goto :loop2 echo macro 3 running type nul>"%tempfile%"     start "" /w /b c:\program files (x86)\mozilla firefox\firefox.exe" imacros://run/?m="mymacro3.iim" :loop3 if exist "%tempfile%" ping -n 10 localhost >nul & goto :loop3 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -