Page 1 of 1

Disable Autohotkey on certain program

Posted: 03 Sep 2020, 04:49
by aprilka
How can I Disable Autohotkey on certain program
Can I write some line about this
I need this for VirtualDJ, cos this app has many shortcuts

ahk_class vdjWin
ahk_exe virtualdj.exe
ahk_pid 13952

Re: Disable Autohotkey on certain program

Posted: 03 Sep 2020, 06:13
by Rohwedder
Hallo,
use:

Code: Select all

#IfWinNotActive ahk_exe virtualdj.exe

Re: Disable Autohotkey on certain program

Posted: 05 Sep 2020, 11:55
by aprilka
I put the line but nothing happened
I want autohotkey to stop all the keybord shortcuts, when virtual dj is active

any other option ?

Re: Disable Autohotkey on certain program

Posted: 07 Sep 2020, 03:52
by DyaTactic
The line must be above the first hotkey that must be disabled. See also https://www.autohotkey.com/docs/commands/WinActive.htm.

Another method is to set a timer which keep checking if your window is active and if so, disables all hotkeys via the Suspend command. But the method mentioned by Rohwedder is prefered.