Hello, I'm trying to use Gui, +Object to make each control go inside an object with properties Value and hwnd.
My code
Code: Select all
Test := []
Test.Name := []
Gui, +ObjectTest.Name
gui, add, edit, vValue hwndHwnd
Gui, +ObjectTest.Surname
gui, add, edit, vValue hwndHwnd
gui, show
return
f1::
gui, submit, nohide
msgbox % "Control's value: " Test[controlName].value
msgbox % "Control's hwnd: " Test[controlName].hwnd
return
1.
Gui, +ObjectTest.Name
Error: The following variable name contains an illegal character
2.
Code: Select all
; Doing it this way
Gui, +ObjectTest
gui, add, edit, vName.Value hwndHwnd
; and then accessing it like this:
msgbox % "Control's value: " Test.Name.value
msgbox % "Control's hwnd: " Test.Name.hwnd
Values: empty