 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
brewboy
Joined: 01 May 2005 Posts: 1
|
Posted: Sun May 01, 2005 11:43 am Post subject: using ControlGet |
|
|
Hello, I am having trouble using ControlGet. Some of the basic forms work well, but I am trying to see whether a control is visible or not. Normally I would just use something like this:
ControlGet,OutPutVar1,Visible,,Run,WindowName (with Run being the name of the control)
However I believe that I have at least two controls in the window that start with the word 'Run', so I am always getting to status of the other control. I am trying to use the ClassNN to specify the exact control that I want, but OutPutVar1 always returns null. This is how I tried to use it:
ControlGet,OutPutVar1,Visible,,AfxWnd42s 0x097F3032F,WindowName
This does not populate OutPutVar either. Any help appreciated.
thanks |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2436
|
Posted: Sun May 01, 2005 2:18 pm Post subject: |
|
|
Window Spy can be used to retrieve the ClassNN. This should be the classname of the control + the instance number of the control.
Example: | Code: | Gui, Add, Button, x6 y10 w160 h120 gTest1, Run
Gui, Add, Button, x176 y10 w160 h120 gTest2, Run
Gui, Show, x398 y302 h142 w349, Test
Return
Test1:
ControlGet, OutputVar1, Visible,, Button1, Test
If OutputVar1 = 1
MsgBox, Run button 1 is visible
Return
Test2:
ControlGet, OutputVar1, Visible,, Button2, Test
If OutputVar1 = 1
MsgBox, Run button 2 is visible
Return
GuiClose:
ExitApp |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|