What does Gui +hwndBlahBlah +LastFound do exactly?

Get help with using AutoHotkey and its commands and hotkeys
gallaxhar
Posts: 143
Joined: 03 Sep 2014, 06:35

What does Gui +hwndBlahBlah +LastFound do exactly?

24 Apr 2016, 09:05

Code: Select all

Gui +hwndBlahBlah +LastFound
If this is the entire script, what exactly happens?
Is a gui named BlahBlah created? Is it given a hwnd of BlahBlah? I'm confused
User avatar
boiler
Posts: 5239
Joined: 21 Dec 2014, 02:44

Re: What does Gui +hwndBlahBlah +LastFound do exactly?

24 Apr 2016, 09:13

The GUI window will have it's hwnd stored in the variable named BlahBlah. In the AHK commands where you can specify a WinTitle, you can identify the window as ahk_id %BlahBlah%. By using +LastFound, you don't need to specify a title at all in subsequent windowing commands.

If you have nothing else in your script, it essentially does nothing since you never displayed the window using Gui, Show.
gallaxhar
Posts: 143
Joined: 03 Sep 2014, 06:35

Re: What does Gui +hwndBlahBlah +LastFound do exactly?

24 Apr 2016, 09:15

"The GUI window"
What gui window? A new gui window is created?
User avatar
boiler
Posts: 5239
Joined: 21 Dec 2014, 02:44

Re: What does Gui +hwndBlahBlah +LastFound do exactly?

24 Apr 2016, 09:17

No, only if you end up showing it using Gui, Show.
Nope

Re: What does Gui +hwndBlahBlah +LastFound do exactly?

24 Apr 2016, 09:18

I will only give you this link. This way you will at least search a little
(took me 10 seconds to find the answers to your questions)

https://autohotkey.com/docs/commands/Gui.htm
gallaxhar
Posts: 143
Joined: 03 Sep 2014, 06:35

Re: What does Gui +hwndBlahBlah +LastFound do exactly?

24 Apr 2016, 09:19

I have been reading that page and others on the docs for the past 50 minutes, before my original post
What I'm confused about: boiler said the gui is not created unless I use Gui, Show

But it looks like

Code: Select all

Gui +hwndBlahBlah +LastFound
DOES CREATE A GUI it just doesn't SHOW it. I need confirmation on that though

In other words, it looks like

Code: Select all

Gui +hwndBlahBlah +LastFound
is invoking the Gui, New command with the title omitted, so the scripts file name is used (or if that is already used, something else, so that it's really "New")
Image
User avatar
boiler
Posts: 5239
Joined: 21 Dec 2014, 02:44

Re: What does Gui +hwndBlahBlah +LastFound do exactly?

24 Apr 2016, 09:23

Yes a hidden window is created.

Code: Select all

DetectHiddenWindows, On
Gui, +HwndBlahBlah +LastFound
IfWinExist, ahk_id %BlahBlah%
	MsgBox, yes
gallaxhar
Posts: 143
Joined: 03 Sep 2014, 06:35

Re: What does Gui +hwndBlahBlah +LastFound do exactly?

24 Apr 2016, 09:30

ok thanks, see this helps a ton, now I know even doing something like Gui, Font, s12 is secretly creating a Gui, not waiting until I name one, and I can modify its name later before showing

Return to “Ask For Help”

Who is online

Users browsing this forum: IzaO and 347 guests