Running macros one after another from a batch file

In Firefox, using Imacros, I would like to run several macros from a batch file, but here is the problem: I want them to run one after another. So, first, β€œMacro 1” will be launched, after it finishes, β€œMacro 2” will start, and so on until β€œMacro 7”.

My BATCH Code:

cd C:\Program Files\Mozilla Firefox start firefox.exe ping -n 05 127.0.0.1>nul start firefox.exe imacros://run/?m=NAMEofMACRO.iim Imacros VERSION BUILD=7601105 
+3
source share
2 answers

Just change the macro line to use the start /wait switch

 start /wait firefox.exe imacros://run/?m=NAMEofMACRO.iim start /wait firefox.exe imacros://run/?m=NAMEofNextMACRO.iim start /wait firefox.exe imacros://run/?m=NAMEofNextMACRO.iim 

This will start each of them, wait for it to complete, then run the next one.

+7
source

Another way, inside imacros, is to add to each and every macro. iim string

 URL GOTO=imacros://run/?m=NAMEofNextMACRO.iim 

So, you need to run only the first macro; this macro, at the end, will call the second, and the second, at the end, will call the third and so on ...

+3
source

Source: https://habr.com/ru/post/1496262/


All Articles