Create shortcut to activate window by title
How to avoid Alt-Tab
This article will show you how to create Windows shortcut to either:
- Start new application, if it is not yet started or
- Activate the existing window based on the window title, if the application is already running in one of the windows
Why to do that?
I hate using Alt-Tab or mouse for switching between numerous open windows. If there is too many windows and you have taskbar at the bottom of your screen, the titles of windows are even not readable as they are shortened.
How to do that?
- Download and install excellent automation software AutoHotKey (GNU GENERAL PUBLIC LICENSE)
- Create 1 AutoHotKey script for your application, f.e. firefox.ahk. Place following content:
SetTitleMatchMode 2 ; 2 means that Firefox can be anywhere in the title IfWinExist, Firefox { WinActivate ; Automatically uses the window found above. } else { run c:\apps\sit\prohlizece\firefox\firefox.exe } Exit ; This will force AutoHotKey to finish, rather than to stay in memory running - Try your file by double clicking your script
You can than assign this shortcut to special keys of your keyboard, save them to the desktop or assign standard keyboard shortcut to invoke the action.
I prefer assigning them to upper row of keys of my Microsoft Natural Keyboard 4000, as this means that I can activate particular application just with single hitting the button, no additional key is required to press too.
If you have some additional tips or ideas, please leave a comment.
Links
- Keyboard media keys - download to detect special keys of your USB keyboard for AutoHotKey
Související články v kategorii RSI What Helps
- Jak předejít a řešit bolest v zápěstí - zkušenosti programátora - 17.10. 2008
- RSI Tip - Beware vibrations - 27.7. 2008
- 3 tips to make your cycling RSI safe - 22.3. 2008
- RSI tip - Geladrink and vertical mouse helped me lot - 18.3. 2008
- RSI tip - Turn your door handle vertical - 5.3. 2008
Související články v kategorii SW development
- How to simulate vertical text (writing-mode:tb-rl) in Firefox - 29.7. 2009
- Jak nakupovat elektroniku šetrnou k přírodě - 7.5. 2009
- Elevator electricity consumption and CO2 calculator - 21.2. 2009
- Jak předejít a řešit bolest v zápěstí - zkušenosti programátora - 17.10. 2008
- Adding Team/SVN commands for existing projects (Eclipse Ganymede) - 17.9. 2008



Hi,
I have the same keyboard and use autohotkey. How do you remap the favorites button to us your script above?
thanks
Hi Popoy, I was never able to remap Favourites button (the one with star on it), when I press it it shows always “Show my favourites” window.
I could not remap Volume up/down buttons either, but would like to do so. If you find a way, please let me know.