I've looked around and can't find this anywhere. The docs don't have a simple example.
I've checked the message board and don't see this simple question answered. I must be doing something easy wrong.
I have a combobox on an external windows app. I've tried several things, here is the simplest which I think should work:
ControlGet, var1, Choice,,Edit1, "My Program"
msgbox, %var1%
I can't get anything to come back other than blank. It is odd because the WindowSpy program can see the value and return it with no problem... Any help would be great!
Thanks again! I hope I'm missing something easy! I can read the TextBox controls but not the ComboBox
External c# Program ComboBox
Re: External c# Program ComboBox
You probably have the wrong WinTitle; see documentation.
Re: External c# Program ComboBox
I'm able to pull textbox controls from the same window using the same window title. I think I have it right?
Re: External c# Program ComboBox
Try changing Edit1 to ComboBox1. Demonstration is below.
Window Spy shows the control names-- but interesting that it shows both "Edit1" and "ComboBox1" for AHK GUI, depending on the exact cursor placement.
Code: Select all
Gui, Font, s10
Gui, Add, ComboBox, vcolor gGet, Red|Green|Blue|Black|White
Gui, Show
Return
Get:
Sleep, 100
ControlGet, var1, Choice,, ComboBox1, ahk_class AutoHotkeyGUI
MsgBox, %var1%
Return