It's actually in response to an answer on another post, but since it's a different question, it seemed fitting.
I see a ton of examples of it being used, but I'm not exactly sure what it's doing.
Thanks!
What is +HwndGHwnd? Topic is solved
-
- Posts: 26
- Joined: 04 Sep 2016, 09:47
- Masonjar13
- Posts: 1555
- Joined: 20 Jul 2014, 10:16
- Location: Не Россия
- Contact:
Re: What is +HwndGHwnd? Topic is solved
+hwnd is an option for a gui, it says to add the hwnd (window handle) of the gui to the specified variable. The specified variable is denoted immediately after the option: +hwndvar. ghwnd is short for guihwnd. Easy to remember, in my opinion.
Re: What is +HwndGHwnd?
I usually use +hwndMYHWND (and keep adding numbers/names for each other gui, like +hwndMYHWNDSettings or +hwndMYHWND2)
"My" basically means "my gui's HWND, not some other programs gui"
"My" basically means "my gui's HWND, not some other programs gui"
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
*poke*
Is it December 21, 2012 yet?
-
- Posts: 26
- Joined: 04 Sep 2016, 09:47
Re: What is +HwndGHwnd?
Thanks!
Re: What is +HwndGHwnd?
Sometimes you need to know the hwnd of your GUI window so you can refer to it with commands where you need to specify the window, such as making the GUI semi-transparent:
Code: Select all
WinSet, Transparent, 150, ahk_id %MYHWND%
Re: What is +HwndGHwnd?
basically what he said.
use "my" to clearly indicate that it's MY gui/window/program/script, not some other app or control. Controls can have hwnds too, but I only use this layout for the windows itself.
use "hwnd" to indicate that its a unique id/handle/pointer to the window, not its title or other.
use "name or number" if I'll have multiple myhwnd vars. if it's a simple script, might get lazy and do myhwnd1/2/3 or if I'm not lazy and want clarity myhwndMain/Settings/Whatever
use "my" to clearly indicate that it's MY gui/window/program/script, not some other app or control. Controls can have hwnds too, but I only use this layout for the windows itself.
use "hwnd" to indicate that its a unique id/handle/pointer to the window, not its title or other.
use "name or number" if I'll have multiple myhwnd vars. if it's a simple script, might get lazy and do myhwnd1/2/3 or if I'm not lazy and want clarity myhwndMain/Settings/Whatever
rawr. fear me.
*poke*
Is it December 21, 2012 yet?
*poke*
Is it December 21, 2012 yet?
Who is online
Users browsing this forum: JKJadan and 264 guests