I am trying to create Google Chrome specific hot strings. The problem is, that for some strange reason SetTitleMatchMode doesn't seem to working. Here is my example code:

SetTitleMatchMode, 2
#IfWinActive, Chrome

I also tried with REGEX setting but it doesn't work as well

SetTitleMatchMode, REGEX

To make things working i have to change 2nd line to #IfWinActive otherwise it doesn't work, but I would like to make it more general. Any ideas?


2 Answers 2


Chrome doesn't have "Chrome" in its title. You can check for the process instead.

#if WinActive("ahk_exe chrome.exe")
  • you have few errors in your script. first of all it is called #IfWinActive and secondly there is a comma after it. And beside this. It seems to not working as well
    – Kajiyama
    Sep 25, 2014 at 14:31
  • 1
    @Kajiyama #If, WinActive(). I don't see any errors in my script. It's a different way of using the #if directive which is much more flexible. Make sure you're using the latest version of AHK (v1.1.16.04) and it should work fine.
    – Sidola
    Sep 25, 2014 at 16:49
#IfWinActive, ahk_class Chrome_WidgetWin_1

Use AU3_Spy(C:\Program Files\AutoHotkey\AU3_Spy.exe) for get the information about the window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.