3

I'm looking for an AutoHotKey script (or anything else for that matter) that will allow me to associate bringing an application to the forefront with a keyboard shortcut (preferably a Function Key).

Toby Allen
  • 10,997
  • 11
  • 73
  • 124

1 Answers1

9

Very basic solution. Create new .ahk script and run. When you press F7 the window will be activated. Edit your hotkey where I labelled it (keep the double colon). Edit the window title that you want activated.

SetTitleMatchMode, 2       ;// matches partial window titles


F7::                       ;// hotkey
   WinActivate, Firefox    ;// activate window with this title
return
mikew
  • 1,634
  • 2
  • 15
  • 25
  • how would this work with Chrome where the window title depends on which tab is open? – Kalamalka Kid Nov 06 '21 at 23:06
  • 1
    @KalamalkaKid as i remember, chrome window titles are of the form "HTML TITLE TAG TEXT - Google Chrome" so using "- Google Chrome" for the WinTitle param should work – mikew Nov 08 '21 at 06:46