Win active

Get help with using AutoHotkey and its commands and hotkeys
Aoky Carmona
Posts: 3
Joined: 19 Jul 2018, 21:45

Win active

20 Jul 2018, 12:08

Hi, I program this code:

Code: Select all

If WinActive, ahk_class indesign
	{MButton:: Send, {Space Down}{LButton Down}
	MButton Up:: Send, {Lbutton Up}{Space Up}
	Return
	}
But if I change to any aplication (like chrome or windows explorer) it keeps doing the same function.
User avatar
gregster
Posts: 1389
Joined: 30 Sep 2013, 06:48

Re: Win active

20 Jul 2018, 12:18

Please look up context-sensitive hotkeys and the difference between commands and #-directives

Code: Select all

#IfWinActive, ahk_class indesign
	MButton:: Send, {Space Down}{LButton Down}
	MButton Up:: Send, {Lbutton Up}{Space Up}
#If
You could start with the tutorial: https://autohotkey.com/docs/Tutorial.htm#s22 - but don't stop there!
Also compare your other thread: https://autohotkey.com/boards/viewtopic ... 27#p229350

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], sulphuricsaliva and 26 guests