Launch macros one by one from a batch file

萝らか妹 提交于 2019-12-06 07:48:36

问题


In Firefox, Using Imacros, I would like to launch multiple macros from a batch file but here is the problem: I want them to run one by one.
So first 'Macro 1' will run then after it completes, 'Macro 2' will run and so on till '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

回答1:


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

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

That will launch each one, wait for it to finish, then start the next.




回答2:


Another way, inside imacros, is to add at the and of each macro.iim the line

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

So you have to run just 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...



来源:https://stackoverflow.com/questions/14383576/launch-macros-one-by-one-from-a-batch-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!