基于下拉菜单的 Autohotkey GUI 中的提交按钮

基于下拉菜单的 Autohotkey GUI 中的提交按钮

通过自动热键我试图

  1. 读取下拉框的内容
  2. 在 AHK GUI 下拉框中向用户显示内容
  3. 通过AHK下拉框的输入在原下拉框中选择正确的项。

到目前为止我有以下代码:

CClass  = fpOCXComboBox209
Title   = ahk_class ThunderRT6FormDC

ControlGet, ItemList, List,, % CClass, % Title
Gui, Add, DropDownList, vDDL, % RegExReplace(ItemList,"`n","|")
Gui, Add, Button, gSetChoice, Select ; gLabel jumps to action.
Gui, Show, w300
return

SetChoice:
    GuiControlGet, CurItem,, DDL
    Control, ChooseString, % CurItem, % CClass, % Title
return

GuiClose: ExitApp

我测试时的行为是,当我在 Gui 下拉框中按下“选择”时,原始下拉框被清空(好像 AHK 试图添加一个空白变量或类似的东西)

我相信错误可能出现在最后一行“Control, ChooseString, % CurItem, % CClass, % Title”中,但我不知道原因。

有人能帮助我吗?

相关内容