---------------------------
AutoHotkeyU64.exe
---------------------------
Error: This value of type "String" has no method named "Submit".
Line#
---> 029: NamedCtrlContents := Gui.Submit()
The current thread will exit.
---------------------------
OK
---------------------------
How to submit the GUI to get the value of the controls
Re: How to submit the GUI to get the value of the controls
Gui is a reserved keyword, so u should have gotten a very different error long before that
Code: Select all
G := Gui.New()
G.Add('Edit', 'vEdit1', 'asdffasf')
NamedCtrlContents := G.Submit()
MsgBox NamedCtrlContents.Edit1
Re: How to submit the GUI to get the value of the controls
@swagfag
The four lines of code are still reporting errors as belove.
---------------------------
AutoHotkeyU64.exe
---------------------------
Error: This value of type "String" has no method named "New".
Line#
---> 001: G := Gui.New()
The current thread will exit.
---------------------------
OK
---------------------------
version:Version 2.0-a108-a2fa0498
Code: Select all
G := Gui.New()
G.Add('Edit', 'vEdit1', 'asdffasf')
NamedCtrlContents := G.Submit()
MsgBox NamedCtrlContents.Edit1
---------------------------
AutoHotkeyU64.exe
---------------------------
Error: This value of type "String" has no method named "New".
Line#
---> 001: G := Gui.New()
The current thread will exit.
---------------------------
OK
---------------------------
version:Version 2.0-a108-a2fa0498
Re: How to submit the GUI to get the value of the controls
if you're going to use an old version, then you need to use the correct syntax for that old version
with a108 you need to use GuiCreate() function.
Gui.New() wasn't added until a112:
https://www.autohotkey.com/boards/viewtopic.php?p=337056#p337056
Code: Select all
G := GuiCreate()
G.Add('Edit', 'vEdit1', 'asdffasf')
NamedCtrlContents := G.Submit()
MsgBox NamedCtrlContents.Edit1
Re: How to submit the GUI to get the value of the controls
Thank you!
I don't know if swagfag and guest3456 are the same person,I should accept one answer to mark the topic as Solved.
I don't know if swagfag and guest3456 are the same person,I should accept one answer to mark the topic as Solved.
Re: How to submit the GUI to get the value of the controls
then accept the one that solved it(if any)
always specify versions, unless ure running the latest one. otherwise, the latest is assumed
always specify versions, unless ure running the latest one. otherwise, the latest is assumed
Who is online
Users browsing this forum: No registered users and 31 guests