自动热键如何将下拉列表连接到此处的编辑框



我已经尝试了好几天的一切来解决这个问题,我太累了,需要帮助,我希望下拉列表中的每个数字都有自己的加载,例如DDL 1应该独立加载所有编辑框和DDL2等等。每个DDL都应该加载自己的数据。。这是我的代码

`Gui 1:Font, S8 CDefault, Tahoma
Gui, Color, 008AB8
Gui 1:Show, x131 y91 h379 w479, Rotation Helper
Gui, Add, DropDownList,x76 y27 w50 h20 r10 gLoad, 1|2|3|4|5|6|7|8|9|10|11
Gui, Add, Edit, x76 y57 w50 h20 vMyEdit,Hotkey
Gui, Add, Edit, x76 y87 w50 h20 vMyEdit2,Color
Gui, Add, Edit, x76 y117 w50 h20 vX1,X1
Gui, Add, Edit, x76 y147 w50 h20 vY1,Y1
Gui, Add, Edit, x76 y177 w50 h20 vX2,X2
Gui, Add, Edit, x76 y207 w50 h20 vY2,Y2
Gui, Add,  Button, x366 y337 w90 h30 gLoad, Load
Gui, Add, Button, x256 y337 w100 h30 gSave, Save
Gui, Add, GroupBox, x6 y7 w450 h250 , Settings
Save:
Gui, Submit, NoHide
IniWrite,%MyEdit%, %a_Workingdir%Iniread.ini, List, List1
IniWrite,%MyEdit2%, %a_Workingdir%Iniread.ini, List, List2
IniWrite,%X1%, %a_Workingdir%Iniread.ini, List, List3
IniWrite,%Y1%, %a_Workingdir%Iniread.ini, List, List4
IniWrite,%X2%, %a_Workingdir%Iniread.ini, List, List5
IniWrite,%Y1%, %a_Workingdir%Iniread.ini, List, List6
return
Load:
GuiControl,, MyEdit, %Read% 
GuiControl,, MyEdit2, %Read2%
GuiControl,, X1, %newX1% 
GuiControl,, Y1, %newY1%
GuiControl,, X2, %newX2%
GuiControl,, Y2, %newY2%

Iniread, Read, %a_workingdir%Iniread.ini, List, List1
Iniread,Read2, %a_Workingdir%Iniread.ini, List, List2
Iniread,newX1, %a_Workingdir%Iniread.ini, List, List3
Iniread,newY1, %a_Workingdir%Iniread.ini, List, List4
Iniread,newX2, %a_Workingdir%Iniread.ini, List, List5
Iniread,newY2, %a_Workingdir%Iniread.ini, List, List6


Return`

在ini中添加DDL值作为参数,submit添加DDL值并读取数据,然后load中设置它。

Gui, Color, 008AB8
Gui 1:Show, x131 y91 h379 w479, Rotation Helper
Gui, Add, DropDownList,x76 y27 w50 h20 r10 gLoad vDDL, 1|2|3|4|5|6|7|8|9|10|11
Gui, Add, Edit, x76 y57 w50 h20 vMyEdit,Hotkey
Gui, Add, Edit, x76 y87 w50 h20 vMyEdit2,Color
Gui, Add, Edit, x76 y117 w50 h20 vX1,X1
Gui, Add, Edit, x76 y147 w50 h20 vY1,Y1
Gui, Add, Edit, x76 y177 w50 h20 vX2,X2
Gui, Add, Edit, x76 y207 w50 h20 vY2,Y2
Gui, Add,  Button, x366 y337 w90 h30 gLoad, Load
Gui, Add, Button, x256 y337 w100 h30 gSave, Save
Gui, Add, GroupBox, x6 y7 w450 h250 , Settings
Save:
Gui, Submit, NoHide
IniWrite,%MyEdit%, %a_Workingdir%Iniread.ini, List%DDL%, List1
IniWrite,%MyEdit2%, %a_Workingdir%Iniread.ini, List%DDL%, List2
IniWrite,%X1%, %a_Workingdir%Iniread.ini, List%DDL%, List3
IniWrite,%Y1%, %a_Workingdir%Iniread.ini, List%DDL%, List4
IniWrite,%X2%, %a_Workingdir%Iniread.ini, List%DDL%, List5
IniWrite,%Y1%, %a_Workingdir%Iniread.ini, List%DDL%, List6
return
Load:
Gui, Submit, NoHide
Iniread, Read, %a_workingdir%Iniread.ini, List%DDL%, List1
Iniread,Read2, %a_Workingdir%Iniread.ini, List%DDL%, List2
Iniread,newX1, %a_Workingdir%Iniread.ini, List%DDL%, List3
Iniread,newY1, %a_Workingdir%Iniread.ini, List%DDL%, List4
Iniread,newX2, %a_Workingdir%Iniread.ini, List%DDL%, List5
Iniread,newY2, %a_Workingdir%Iniread.ini, List%DDL%, List6
GuiControl,, MyEdit, %Read%
GuiControl,, MyEdit2, %Read2%
GuiControl,, X1, %newX1%
GuiControl,, Y1, %newY1%
GuiControl,, X2, %newX2%
GuiControl,, Y2, %newY2%

最新更新