4 ms·
My similar solution that I use for Outlook/Teams/TotalCommander/more: https://github.com/larsch/AutoHotkeyScripts/blob/main/Launcher.ahk https://github.com/lars
by larschdk 3y ago
My similar solution that I use for Outlook/Teams/TotalCommander/more: https://github.com/larsch/AutoHotkeyScripts/blob/main/Launcher.ahk https://github.com/larsch/AutoHotkeyScripts/blob/main/Launch...
I do include Minimize-if-already-active though. I like to be able to temporary flip an application into focus (e.g. Outlook) and then return to what I was previously working on.
Plus a tweak: When launching, programs may open in the background because Windows attempts to prevent applications stealing focus when you are working in another program. I overcome this by focusing the tray before launching.
- diogotito 3y agoI also wrote my AHK functions to have hotkeys to cycle through (or toggle) windows from an application! Here: https://github.com/diogotito/autohotkey-scripts/blob/desktop/Lib/CycleOrLaunch.ahk https://github.com/diogotito/autohotkey-scripts/blob/desktop... and here's where I declare most of my hotkeys: https://github.com/diogotito/autohotkey-scripts/blob/desktop/desktops.ahk https://github.com/diogotito/autohotkey-scripts/blob/desktop... It uses AHK's window groups. I only regret having written this in AHK v1, which was a bit of a pain in the neck. I intend rewrite them in AHK v2, which looks like a halfway step to ES6 with lambdas, closures and all. So many quirks gone! I tried it a bit and it felt more fun and productive. As a simpler alternative (which I use for work), one can pin the 10 most used applications on the taskbar and do: - Win+<N> to launch, toggle, or choose a window from the Nth application - Ctrl+Win+<N> to launch, toggle or cycle through the windows from the Nth application - Shift+Win+<N> to launch a new window - Alt+Win+<N> to bring up the Jump List Then you can use a simpler hotkey manager (like PowerToys' Keyboard Manager) to bind to the Ctrl+Win+<N> shortcuts. > Plus a tweak: When launching, programs may open in the background because Windows attempts to prevent applications stealing focus when you are working in another program. I overcome this by focusing the tray before launching. Aaah! That explains some things. That does happen to me sometimes and it's a bit annoying. I got used to pressing my hotkey again when I noticed the taskbar icon blinking green to bring up the new window, or just spamming WinActivate and hope for the best. Thanks!
- myfonj 3y agoYes, Win+<number> is also a gem that almost seems to be deliberately hidden, (like Win+T, Win+B). One thing that helps is to see actual numbers in the taskbar, what, to my knowledge, is currently possible in Windows 10 (only) with third-party app: https://ramensoftware.com/7-taskbar-numberer https://ramensoftware.com/7-taskbar-numberer . For startup start "" "C:\...\7+ Taskbar Numberer.exe" -v2 -hidewnd will show same number for grouped windows so cycling will work. Btw most tabbed interfaces have the same bindings for focusing first, second ... last tab (Ctrl+<number> in most browsers, Ctrl+9 for the last tab, usually). I like to apply same "tab principles" to taskbar, so last thing missing here is to be able to "Ctrl+PgUp/PgDown" through windows in Taskbar order just like in sane browsers (with Win in place of Ctrl). I attempted to do it with AHK but failed miserably, but luckily another third-party app, (7+ Taskbar Tweaker, from the same author as Numberer) can do that through advanced settings. Config in gist: https://gist.github.com/myfonj/62b4e0d393f4a97df5e9904df5e776b1 https://gist.github.com/myfonj/62b4e0d393f4a97df5e9904df5e77... (Sadly, none of those will probably ever work outside Windows 10 (?))