blank parameter followed by &var Topic is solved

Report problems with documented functionality
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

blank parameter followed by &var

10 Feb 2018, 11:56

I was testing script conversion, and got a 'Syntax error' error message with AHK v2.0-a088 (the latest version), when a blank parameter was followed by a parameter of the form '&var'. Although I have found some workarounds.

Code: Select all

q:: ;test blank parameter followed by '&var'
hCtl := ControlGetHwnd("Edit1", "A")
vText := "abcde"

;SendMessage(0xC,, &vText,, "ahk_id " hCtl) ;WM_SETTEXT := 0xC ;doesn't work
;SendMessage(0xC, "", &vText,, "ahk_id " hCtl) ;WM_SETTEXT := 0xC ;works
;SendMessage(0xC,, 0+&vText,, "ahk_id " hCtl) ;WM_SETTEXT := 0xC ;works

;MyFunc(,,,,, &vText) ;doesn't work
;MyFunc(,,,, "", &vText) ;works
MyFunc(,,,,, 0+&vText) ;works
return

MyFunc(oArray*)
{
	SoundBeep()
}
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: blank parameter followed by &var

10 Feb 2018, 13:38

Look like a parsing error. Another workaround for sendMessage, just omit the & ;)

Cheers.
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: blank parameter followed by &var  Topic is solved

26 Mar 2018, 04:57

This was fixed in v2.0-a089.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 16 guests