Example Code that works
Code: Select all
MyGui := Gui()
MyGui.Add("Edit", "vFirstName")
MyGui.Add("Button", "default", "OK").OnEvent("Click", ProcessUserInput)
MyGui.Show()
ProcessUserInput(*)
{
MsgBox("You entered '" MyGui.Submit().FirstName)
}
My code
This does not work and throws errors. I added the "MyGui := Gui()" to try and declare the GUI as a global object/variable, but then it says "Error: This value of type "Object" has no property named "FirstName"."
Code: Select all
MyGui := Gui()
!Numpad1::
{
MyGui := Gui()
MyGui.Add("Edit", "vFirstName")
MyGui.Add("Button", "default", "OK").OnEvent("Click", ProcessUserInput)
MyGui.Show()
}
ProcessUserInput(*)
{
MsgBox("You entered '" MyGui.Submit().FirstName)
}