I currently use a batch file, which goes to a .js and opens my macro to loop 10 times. I want to automatically close palemoon once the macro is done looping so next time it runs it will be able to launch the browser again.
This is my .js code:
Code: Select all
var i;
for (i = 1; i < 10; i++) {
iimSet("loop", i);
iimPlay("MyMacro");
}
EDIT: After researching, it appears the best way may be to close it through the batch file. I have experimented with TIMEOUT /T 30 and in the command line it shows the countdown and closes the browser. When I put 2000 instead, it does not show in the cmd box, and there is no countdown or shutdown. I am doing 10 loops and each can take anywhere from 1 minute to 5 minutes if the server is clogged up.
The timeout counter doesnt start under I manually close the browser
Code: Select all
start /wait firefox.exe imacros://run/?m="UsersDLoop.js"
TIMEOUT /T 2000 /NOBREAK
Taskkill /IM "firefox.exe" /F
Exit