ControlXXX commands with a blank first parameter Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

ControlXXX commands with a blank first parameter  Topic is solved

08 Oct 2018, 17:01

I was working on some backport functions:
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
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333 and 274 guests