I know how to create an AutoHotkey script to switch to (say) a Firefox window.

But suppose I have a number of Firefox windows open. I would like the key to switch to the next window each time it is pressed.

Edit - firefox was just an example. It could be PuTTY windows I wanted.

link|improve this question

65% accept rate
My answer would still function for any other window, too. – Phoshi Apr 2 '10 at 20:05
Agree @Phoshi - but the other answer was specific to Firefox – justintime Apr 2 '10 at 20:11
feedback

3 Answers

up vote 4 down vote accepted

Try the WinActivateBottom command instead of WinActivate.

This activates the LEAST recently used window - and seeing as when you activate that, it's no longer the least recently used, this can be used to loop through every window.

; This hotkey WIN+A allows you to visit all open Firefox windows in order from oldest to newest:
#a::
SetTitleMatchMode, 2
WinActivateBottom, - Mozilla Firefox
return
link|improve this answer
Interesting idea. My feeling is the one at the bottom is likely to be the least interesting window to go to. – justintime Apr 2 '10 at 20:09
@justintime: Very likely. You could also use WinGet to retrieve a list of windows, and then do with that what you will - but I've not used that myself. – Phoshi Apr 2 '10 at 20:15
I have taken you answer as a starting point. If you are already on a n active Firefox window send it to bottom and then go to what is now the top. – justintime Apr 2 '10 at 20:30
feedback

Here's how this can be done.

  1. get active window title and class.
  2. get a list of all windows of that class.
  3. switch to the next window in that list.
link|improve this answer
feedback

I think if you use a recent version of Firefox, you can use the tabs within it every time you want to open a new web page. You can browse through different tabs using Ctrl + Page Down. I am sure you can write an AutoHotkey program to do just that.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.