Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Close all internet explorer windows


  • Please log in to reply
5 replies to this topic
Jon
  • Members
  • 349 posts
  • Last active: Aug 30 2011 08:35 PM
  • Joined: 28 Apr 2004
This is a very simple script but I find it useful-

^!z::

ifwinexist, ahk_class IEFrame
{

loop
{
winclose, ahk_class IEFrame

IfWinNotExist, ahk_class IEFrame
{
EXIT
}

}

}

EXIT



I normally find myself opening alot of internet explorer windows and when I've finished working I have to open each one and close it manually. That will close all IE windows via a hotkey and then exit.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
You might find window groups to be useful. I use one to visit MSIE windows one by one. You can also close all windows in a group with GroupClose, e.g.:

GroupAdd, MSIE, ahk_class IEFrame
return
Numpad1::GroupActivate, MSIE ; Visit the next MSIE window.
Numpad0::GroupClose, MSIE ; Close the current MSIE and move on to next.
Numpad2::GroupClose, MSIE, A ; Close all MSIE windows.

jamestr
  • Members
  • 98 posts
  • Last active: Jul 03 2008 12:30 AM
  • Joined: 05 Apr 2004
this is OT but you might try
a browser that has multiple website windows,

myie2 (ie6 shell)
opera
mozilla

all use multiple windows.

Jon
  • Members
  • 349 posts
  • Last active: Aug 30 2011 08:35 PM
  • Joined: 28 Apr 2004
Thanks, that is a much simpler way of doing it :D

I noticed the group options last night but didn't really understand what they did. I probably should have tried some of the examples in the help files. It looks useful.

you might try
a browser that has multiple website windows,


I've got mozilla, mozilla firefox and opera, I 've also tried myie2 and crazy browser but I prefer IE. I don't really like tabs. Maybe it's because I have been using IE for so long

Thanks for your help, Jon :D

Jason
  • Guests
  • Last active:
  • Joined: --
Any ideas why only ^Numpad1 has any affect?

GroupAdd, MSIE, ahk_class IEFrame
return
GroupAdd,EXPLORER, ahk_class CabinetWClass
return
^Numpad0::GroupActivate, EXPLORER ; visit windows explorer windows
^Numpad1::GroupActivate, MSIE ; Visit the next MSIE window.




When I comment out the first two lines and ^Numpad1, then ^Numpad0 DOES have an affect.

I appreciate if you can correct it,
Payam

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
It looks like you have an extra "return" in there. Typically, the GroupAdd commands are used in the auto-execute section (top part) of the script, since they only need to be executed once.