Gui Option parameter invalid

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

Gui Option parameter invalid

Post by pneumatic » 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: 1513
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Gui Option parameter invalid

Post by TheDewd » 05 Mar 2018, 13:55

Code: Select all

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

Gui, New 
Gui, % Option1 . Option2

Gui, Show, Center w320 h240
return

User avatar
derz00
Posts: 497
Joined: 02 Feb 2016, 17:54
Location: Middle of the round cube
Contact:

Re: Gui Option parameter invalid

Post by derz00 » 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: 9609
Joined: 30 Sep 2013, 04:07
Contact:

Re: Gui Option parameter invalid

Post by lexikos » 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.)

Post Reply

Return to “Bug Reports”