Gui Option parameter invalid

Report problems with documented functionality
pneumatic
Posts: 190
Joined: 05 Dec 2016, 01:51

Gui Option parameter invalid

02 Mar 2018, 18:12

Hello, just wondering if this is a bug.

Code: Select all

Option1 := ""
Option2 := "+AlwaysOnTop"

/* Doesn't work
Gui , New 
Gui , %Option1% %Option2%
*/

/* Works
Gui , MyGui: New 
Gui , MyGui: %Option1% %Option2%
*/

/* Also works
Gui , New , %Option1% %Option2%
*/

Gui , Show , Center w320 h240
return
Thanks, and apologies in advance for anything I've overlooked.
User avatar
TheDewd
Posts: 1135
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Gui Option parameter invalid

05 Mar 2018, 13:55

Code: Select all

Option1 := ""
Option2 := "+AlwaysOnTop"

Gui, New 
Gui, % Option1 . Option2

Gui, Show, Center w320 h240
return
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
User avatar
derz00
Posts: 497
Joined: 02 Feb 2016, 17:54
GitHub: derz00
Location: Middle of the round cube

Re: Gui Option parameter invalid

05 Mar 2018, 15:36

Code: Select all

Gui , New 
Gui , %Option1%%Option2%
This works, but I don't know why you're third version wouldn't work...
try it and see
...
lexikos
Posts: 6207
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Gui Option parameter invalid

06 Mar 2018, 01:42

I'd guess that the leading space prevents it from being recognized as "+/-options". I don't know if it's a bug strictly speaking, but I intend to fix it.

(A space within the parameter value is different to space preceding the literal text in the code.)

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 5 guests