Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
User interface 自动热键-GUI提交,然后执行某些操作_User Interface_Input_Autohotkey - Fatal编程技术网

User interface 自动热键-GUI提交,然后执行某些操作

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

我对自动热键程序相当陌生。我正在尝试创建一个相当简单的“应用程序”,它允许我输入一些细节,然后在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 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

您的代码给了我一个错误:您使用的是什么版本的自动热键?