commands as functions (AHK v2 functions for AHK v1) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=29689
And I noticed that, unusually, something wasn't working as expected.
It turns out that if you use the no-comma style, then certain code doesn't work as expected. But that % "" can be used as a workaround.
Code: Select all
q::
ControlGet, hCtl, Hwnd,, Edit1, A
;ControlSetText,, abc, % "ahk_id " hCtl ;works
;ControlSetText , abc, % "ahk_id " hCtl ;doesn't work
;ControlSetText % "", abc, % "ahk_id " hCtl ;works
ControlSend,, abc, % "ahk_id " hCtl ;works
ControlSend , def, % "ahk_id " hCtl ;doesn't work
ControlSend % "", ghi, % "ahk_id " hCtl ;works
;ControlMove,, 50,,,, % "ahk_id " hCtl ;works
;ControlMove , 50,,,, % "ahk_id " hCtl ;doesn't work
;ControlMove % "", 50,,,, % "ahk_id " hCtl ;works
return