I use the Pomello App and it already stays on top of other windows even if I click them. However, to use its built-in hotkeys, I have to click the window to select it so the hotkeys will take effect.
What I want is a way to make one hotkey to select this specific window (Pomello) and that's it. Like Alt + A to select the Pomello window so I can use its hotkeys without having to hover the mouse to the window and click it.
It would be nice to make it a toggle so that pressing it again would reselect the previously selected window.
I'm still an ahk noob, so any help with that would be much appreciated.
Hotkey to select a specific window that is already on top
Re: Hotkey to select a specific window that is already on top
The first couple lines of any of your hotkey definitions for that window should be:
...assuming Pomello is the title of the Pomello app's window.
Rather than pressing it again to return to the other window, wouldn't it be better to automatically activate the previous window after it does what it needs to with the Pomello window active?
Code: Select all
WinActivate, Pomello
WinWaitActive, Pomello
Rather than pressing it again to return to the other window, wouldn't it be better to automatically activate the previous window after it does what it needs to with the Pomello window active?
Re: Hotkey to select a specific window that is already on top
Thanks for the reply!boiler wrote:Rather than pressing it again to return to the other window, wouldn't it be better to automatically activate the previous window after it does what it needs to with the Pomello window active?
How would the script know when I am done with Pomello to automatically select the previous window?
Re: Hotkey to select a specific window that is already on top
This isn't meant to sound flippant, but you're done with it when you're done with it. You want to send certain keys to it, right? After you've sent them, then switch back to the other window. I guess I was thinking your hotkey to switch to that window would also send a certain key to it. But if your hotkey is only to switch windows, then your plan to switch it back by pressing the hotkey again after you're done manually pressing the keys meant for that window makes sense.
Re: Hotkey to select a specific window that is already on top
No, the hotkey would only serve to select the window, as Pomello has its own hotkey comands. Right now I don't plan on using ahk to also send these hotkey commands, I'd rather just use Pomello's commands.
I set the hotkey to Alt+A and just added the first line you provided and it works just as intended. Since Alt+Tab is just a button away, I think I'll just use that to switch back to the previous window. Just for curiosity's sake, would there be a way to make the command a toggle, so I could press Alt+A again to return to the previous window?
I set the hotkey to Alt+A and just added the first line you provided and it works just as intended. Since Alt+Tab is just a button away, I think I'll just use that to switch back to the previous window. Just for curiosity's sake, would there be a way to make the command a toggle, so I could press Alt+A again to return to the previous window?
Re: Hotkey to select a specific window that is already on top
This would do it:
Code: Select all
!a::
IfWinNotActive, Pomello
{
WinGet, ID, ID, A
WinActivate, Pomello
}
else
WinActivate, ahk_id%ID%
return