Easy Question about Gui Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
masheen
Posts: 295
Joined: 06 Dec 2016, 14:10

Easy Question about Gui

20 Sep 2017, 07:39

i have 2 line

Code: Select all

rqXa := x + 100, rqYa := y + 100
Gui, Map: Show, x%rqXa% y%rqYa% w515 h497, % "Map"
question:
can I do it one line like this?

Code: Select all

Gui, Map: Show, x%x%+100 y%y%+100 w515 h497, % "Map"
User avatar
Delta Pythagorean
Posts: 627
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

Re: Easy Question about Gui

20 Sep 2017, 07:41

Code: Select all

Gui, Map: Show, % "x" x + 100 " y" y + 100 "w515 h497", % "Map"
Try this.

[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat

Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: Easy Question about Gui

20 Sep 2017, 07:45

Or

Code: Select all

Gui, Map: Show, % "x" x + 100 " y" y + 100 " w515 h497", % "Map"
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Easy Question about Gui  Topic is solved

20 Sep 2017, 07:49

Code: Select all

Gui, Map: Show, % Format("x{} y{} w{} h{}", x+100,y+100,515,497), % "Map"

Gui, Map: Show, % Format("x{} y{} w515 h497", x+100,y+100), % "Map"
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
masheen
Posts: 295
Joined: 06 Dec 2016, 14:10

Re: Easy Question about Gui

20 Sep 2017, 08:06

Delta Pythagorean, Helgef, jeeswg thx
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
Location: France
Contact:

Re: Easy Question about Gui

29 Sep 2017, 15:30

@Jeeswg Nice solution cheers, never thought of decoupling both xywh and variable parts using format(). Thanks for sharing.
my scripts

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Billykid, Descolada, icyolive, Swiftly9767 and 308 guests