Any way of writing a macro that closes the entire browser?

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
vidim
Posts: 23
Joined: Mon Nov 17, 2014 4:10 pm

Any way of writing a macro that closes the entire browser?

Post by vidim » Sat Dec 06, 2014 11:22 am

Any commands that I have overlooked that can close the entire browser?

Basically the same as a CTRL-W keystroke. I know I can close the TAB, but if I can close the entire browser I would save memory and all my concurrently running (about 25) Firefox instances would be less prone to locking up.

Running iMacros Firefox Plugin 8.8.7
Windows 7
Firefox 33.1.1
vidim
Posts: 23
Joined: Mon Nov 17, 2014 4:10 pm

Re: Any way of writing a macro that closes the entire browse

Post by vidim » Sat Dec 06, 2014 11:52 am

OP answering his own question:

Yes, easy peasy.

Just use this combination

Code: Select all

TAB CLOSEALLOTHERS
TAB CLOSE
And all of it will be shut down.
Forgive me for posting these questions without thinking through them myself first. It seems like I often manage to fix my own problems after I have put things down in print.

EDIT: And some others claim this leaves Firefox stuck in memory. Guess further testing is needed http://forum.imacros.net/viewtopic.php? ... 888#p50315
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Any way of writing a macro that closes the entire browse

Post by chivracq » Sun Dec 07, 2014 9:00 pm

vidim wrote:OP answering his own question:

Yes, easy peasy.

Just use this combination

Code: Select all

TAB CLOSEALLOTHERS
TAB CLOSE
And all of it will be shut down.
Forgive me for posting these questions without thinking through them myself first. It seems like I often manage to fix my own problems after I have put things down in print.

EDIT: And some others claim this leaves Firefox stuck in memory. Guess further testing is needed http://forum.imacros.net/viewtopic.php? ... 888#p50315
I once posted what I think is a better Solution...:
- Re: How to close the iMacros Browser?
(See Item '-4-' in that Post...)
chivracq wrote:-4- Now the fourth thought, which proved to be successful, is simply to use!:

Code: Select all

URL GOTO=javascript:this.focus();self.opener=this;self.close()
If several Tabs are open, only the current Tab is closed, you may need to loop/repeat that Statement a few times if you want to make sure to close the Last Tab (and the Window with it) if you have several Tabs open...
Tested on iMacros v8.8.2 for FF on Pale Moon v24.5.0 (=FF29) on WinXP SP3.
Last edited by chivracq on Mon Dec 08, 2014 3:16 pm, edited 2 times in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
skippyto
Posts: 108
Joined: Wed Aug 20, 2008 8:14 am

Re: Any way of writing a macro that closes the entire browse

Post by skippyto » Mon Dec 08, 2014 11:14 am

Hi vidim,

If you want to surely close FF, the best way in the following js :

Code: Select all

Components
	.classes['@mozilla.org/toolkit/app-startup;1']
	.getService(Components.interfaces.nsIAppStartup)
	.quit(Components.interfaces.nsIAppStartup.eForceQuit);
// Or use Components.interfaces.nsIAppStartup.eAttemptQuit depending on xhat you really want
Skippyto.
vidim
Posts: 23
Joined: Mon Nov 17, 2014 4:10 pm

Re: Any way of writing a macro that closes the entire browse

Post by vidim » Mon Dec 15, 2014 12:34 am

Thanks guys for those better solutions.

My current solution sometimes gives me an error 910, but I will try it with these instead.
Post Reply