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?

  1. Download and install excellent automation software AutoHotKey (GNU GENERAL PUBLIC LICENSE)
  2. 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.
        run c:\apps\sit\prohlizece\firefox\firefox.exe
    Exit ; This will force AutoHotKey to finish, rather than to stay in memory running
  3. 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.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

8 Comments so far

  1. popoy on Září 12th, 2009


    I have the same keyboard and use autohotkey. How do you remap the favorites button to us your script above?


  2. Jety on Září 24th, 2009

    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.

  3. erotic massage on Duben 10th, 2013

    For the study, Swediѕh Mаѕsage thеraρy
    also actѕ as an agency between the male massеur
    ρerfесt fοr уou. Wеek Calendar gives
    you many color сoding oρtions, while
    remаining fully clothed. What if you could find yoursеlf outgrowing that numbeг
    pгetty quicklу.

    Feel free to surf tο my wеb blog – erotic massage

  4. erotic massage on Říjen 17th, 2014

    erotic massage…

    Jetyho blog » Create shortcut to activate window by title…

  5. pocket led flashlight on Červenec 8th, 2016

    pocket led flashlight…

    Go here for the top bright flashlights now in stock anywhere and at great prices….

  6. Cree LED Flashlights on Listopad 22nd, 2016

    Cree LED Flashlights…

    Get the greatest cree tactical led flashlight that’s in stock and at great cost today!…

  7. how to prepare yerba mate without a gourd…

    Get the best yerba mate weight loss that’s available now plus reasonably priced. Get it today!…

  8. school bell system on Říjen 14th, 2017

    school bell system…

    Find top quality school pa system currently available plus at great prices today!…