Often after closing a window focus goes to the taskbar
I'd like to create a script that
1) will close the current window
2) if focus went to the taskbar, move it to the currently top window
3) if there are only minimized windows left, restore one of them and move the focus to that one
my problem is with #2.
a) how do you get if focus is on the taskbar (or desktop)?
b) how can you get the currently top window (esp if it does not have focus)?
if somebody can please guide me in the right direction
focus after close
Re: focus after close
I'm not sure if this works but try : IfWinActive, ahk_class Shell_TrayWnd
Re: focus after close
Hey that worked, thanks.
I realized I can press alt+tab to move focus to the top window when the taskbar is active
my final script (took a bit of hacking to get the timing right for alt+tab):
I realized I can press alt+tab to move focus to the top window when the taskbar is active
my final script (took a bit of hacking to get the timing right for alt+tab):
Code: Select all
CapsLock & W::
send !{F4}
sleep 100
IfWinActive, ahk_class Shell_TrayWnd
{
send !{tab down}
sleep 100
send {tab up}
}
return
Who is online
Users browsing this forum: No registered users and 261 guests