|
#AutoIt3Wrapper_icon=
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
;#NoTrayIcon
#include <GUIConstantsEx.au3>
#Include <ACN_MISC.au3>
#include <Array.au3>
#Include <File.au3>
#include <Array.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Global $msg,$input1,$combo1,$combo2,$checkbox1,$num
test()
Func test()
GUICreate("test",370,267)
GUISetBkColor (0x00ffffff)
GUICtrlSetDefColor(0x000000);设置文本默认颜色
GuiCtrlCreateLabel ( "请选择好频率:",20, 20, 100, 21,0x0300)
$combo1=GUICtrlCreateCombo("", 110, 20,60,21)
GUICtrlSetData(-1, "10|100|1000","100")
$checkbox1=GUICtrlCreateCheckbox("", 20, 50, 20, 20)
GuiCtrlCreateLabel ( "输入自定义的频率为:",41, 50, 180, 21,0x0300)
$input1=GUICtrlCreateInput("50", 160, 50, 50, 20)
GuiCtrlCreateLabel ( "次",205, 50, 20, 21,0x0300)
GUICtrlSetColor(-1, 0x000000)
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $checkbox1
If GUICtrlRead($checkbox1,$GUI_CHECKED) Then
GUICtrlSetState($combo1,$GUI_DISABLE)
$num=Number(GUICtrlRead($input1))
Else
GUICtrlSetState($combo1,$GUI_ENABLE)
GUICtrlRead($combo2)
EndIf
EndSwitch
WEnd
EndFunc
还有如何做到对输入框,输入的数值进行检测,只允许输入1-1000的数值,如果输入非数字或数值过大进行提示 |
|