How To close browser upon completion of imacro

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Goldclownfish
Posts: 16
Joined: Mon Apr 29, 2019 3:50 am

How To close browser upon completion of imacro

Post by Goldclownfish » Fri Nov 29, 2019 7:01 am

I've seen several topics asking how to close the browser after a macro runs. Here is a method to close Palemoon upon completion of macro. :shock:
The reason for the -546 is in order to start Palemoon from a batch file an loop the macro multiple times its necessary to use a negative number. You also need to disable(uncheck) "warn me when closing multiple tabs" in preferences-->Tabs

Code: Select all

SET !LOOP -546
SET MyLoop {{!LOOP}}
ADD MYLoop 547
SET CLOSE EVAL("var s='{{MyLoop}}'; var x; if(s=='0'){x='W';} else{x='';}; x;")
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY" CHAR="{{CLOSE}}" MODIFIERS="ctrl,shift"

Windows 10 Palemoon 28.5.0 iMacros 8.9.7
Post Reply