User interface 自动热键-GUI提交,然后执行某些操作
我对自动热键程序相当陌生。我正在尝试创建一个相当简单的“应用程序”,它允许我输入一些细节,然后在msgBox中返回给我。我就是这么做的:User interface 自动热键-GUI提交,然后执行某些操作,user-interface,input,autohotkey,User Interface,Input,Autohotkey,我对自动热键程序相当陌生。我正在尝试创建一个相当简单的“应用程序”,它允许我输入一些细节,然后在msgBox中返回给我。我就是这么做的: #T:: Gui, Add, Text, x26 y27 w420 h30 , MAWB: (Udfyld MAWB nummer format: xxx-xxxxxxxx) Gui, Add, Edit, x26 y67 w420 h20 mawb, MAWB Nummer Gui, Add, Text, x26 y107 w420 h30 , Vælg H
#T::
Gui, Add, Text, x26 y27 w420 h30 , MAWB: (Udfyld MAWB nummer format: xxx-xxxxxxxx)
Gui, Add, Edit, x26 y67 w420 h20 mawb, MAWB Nummer
Gui, Add, Text, x26 y107 w420 h30 , Vælg Handling Agent
Gui, Add, DropDownList, x26 y147 w420 h10 cfs , WFS (5151515151)|Spirit (5151515151)
Gui, Add, CheckBox, x26 y197 w130 h30 forside, Opret og Print Forside
Gui, Add, Button, x26 y257 w140 h40 submitBtn, Udfyld Detaljer Automatisk
; Generated using SmartGUI Creator 4.0
Gui, Show, x131 y91 h379 w479, New GUI Window
Return
submitBtn:
Gui, Submit
MsgBox, 4, Mawb: %mawb%, CFS: %cfs%
Gui, Destroy
Return
GuiClose:
ExitApp
在上面的AHK脚本中,当我单击按钮时,什么也没有发生。。如何在AHK gui中提交脚本,然后在提交“表单”后执行某些操作
提前谢谢 您的解决方案非常接近工作状态。您需要修改两件事:
- 在
行,必须在前面加一个Gui上声明变量时,添加
v
- 在
行,必须将Gui上,添加按钮
放在标签名称前面g
#T::
Gui, Add, Text, x26 y27 w420 h30 , MAWB: (Udfyld MAWB nummer format: xxx-xxxxxxxx)
Gui, Add, Edit, x26 y67 w420 h20 vmawb, MAWB Nummer
Gui, Add, Text, x26 y107 w420 h30 , Vælg Handling Agent
Gui, Add, DropDownList, x26 y147 w420 h10 vcfs , WFS (5151515151)|Spirit (5151515151)
Gui, Add, CheckBox, x26 y197 w130 h30 vforside, Opret og Print Forside
Gui, Add, Button, x26 y257 w140 h40 gsubmitBtn, Udfyld Detaljer Automatisk
; Generated using SmartGUI Creator 4.0
Gui, Show, x131 y91 h379 w479, New GUI Window
Return
submitBtn:
Gui, Submit
MsgBox, 4, Mawb: %mawb%, CFS: %cfs%
Gui, Destroy
Return
GuiClose:
ExitApp
您的代码给了我一个错误:您使用的是什么版本的自动热键?