ahk SetTitleMatchMode stopped working

Posted on

Problem :


I had AHK set up on my computer, a few files (programmen.ahk and grammatik.ahk for example) in the same folder /ahk-script

I might have installed some program, because the script does not work as it should, I have noticed that SetTitleMatchMode is definately
not working as it should. Sometimes when I hit the hotkey, it works, but most of the times it does not.

I don’t know what it is, maybe I’ve installed some program? How can I troubleshoot this?

(In my na├»ve mind I thought it was because I switched from Aero to Basic, so I’m not a superuser but would need help from someone who are. I think I might be able to follow your instructions, especially since AHK is so important to me.)

Use case & script examples

It’s a pity since that’s how I activate my most used programs: Chrome, notepad++, explorer, evernote, calendar.

Here is a few scripts that used to work but now does not


SetTitleMatchMode 2
IfWinExist Notepad++
    WinActivate, Notepad++
    run "c:Program Files (x86)Notepad++notepad++.exe"


SetTitleMatchMode 2
IfWinExist Google Chrome
    WinActivate, Google Chrome
    run "C:Program Files (x86)GoogleChromeApplicationchrome.exe"

Solution :

How can I troubleshoot this?

Problem here is in hotkey combination (CTRL+ALT) that you are using. If you willchange hotkey combination (for example to CTRL+ALT+z), your script should work fine. I dont know exact reason why it does not works with (CTRL+ALT) but I think that other application is using that hotkey combination and there is some kind of conflict. Here is example script for notepad that uses CTRL+ALT+z hotkey combination and is working as intended.

SetTitleMatchMode 2
IfWinExist Notepad
    WinActivate, Notepad
    run "notepad.exe"

Leave a Reply

Your email address will not be published. Required fields are marked *