Windows: go to next (application) window, like alt+tab

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jonnyhotkeys
Posts: 8
Joined: 18 Jan 2016, 13:26

Windows: go to next (application) window, like alt+tab

28 Jul 2016, 05:42

hi, I'm wondering if something exists something that'l allow me to configure a "SHOW 'previous' (most recent) application window" for the focused application, in Windows 7. I figured someone's probably already done this, and I have no clue, so why not ask the web!

I want LIKE an alt+tab, but for the focused app, so I can cycle my Chrome/Explorer/Notepad/Wordpad... application windows...
I know there's some cool winkey+(taskbar#) shortcuts, but I'd like one that knows about the focussed app, and it's children :)

I don't mind if it goes via the appgroup (as oppose to flicking straight to next app.window in group)
Stopping there before I start dreaming of cycling grouped_kinds :)

Any ideas? :?: thanks :thumbup:
GEV
Posts: 1005
Joined: 25 Feb 2014, 00:50

Re: Windows: go to next (application) window, like alt+tab

28 Jul 2016, 06:11

To change between two windows of the same class if this class is active, you can use this:

Code: Select all

F1::
WinGetClass, active_class, A
WinGet, id, list, ahk_class %active_class%
Loop, %id%
{
this_ID := id%A_Index%
IfWinActive, ahk_id %this_ID%
     continue		
WinActivate, ahk_id %this_ID%,
     break
}
return
For more than two windows this:

Code: Select all

F2::
Menu, Windows, Add
Menu, Windows, deleteAll
WinGetClass, active_class, A
WinGet, id, list, ahk_class %active_class%
Loop, %id%
{
this_ID := id%A_Index%
WinGetTitle, Title, ahk_id %this_ID%
Menu, Windows, Add, %Title%, ActivateWindow
WinGet, Path, ProcessPath, ahk_id %this_ID%
Menu, Windows, Icon, %Title%, %Path%,, 0
}
Menu, Windows, Show
return

ActivateWindow:
WinActivate, %A_ThisMenuItem%
return
See also

Code: Select all

GroupAdd
and

Code: Select all

GroupActivate

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 385 guests