#include <GUIConstantsEx.au3>
Example()
Func Example()
$Form = GUICreate("My GUI combo", 300, 100) ; will create a dialog box that when displayed is centered
$Combo1 = GUICtrlCreateCombo("item1", 20, 20, 80, 20) ; create first item
GUICtrlSetData($Combo1, "item2|item3", "item1") ; add other item snd set a new default
GUISetState()
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Combo1
If GUICtrlRead($Combo1) = "item1" Then
MsgBox(64, "TEST", "测试,你选择了第一个项!", 3)
ElseIf GUICtrlRead($Combo1) = "item2" Then
MsgBox(64, "TEST", "测试,你选择了第二个项!这里运行QQ", 3)
Run("D:\QQ.exe")
Else
MsgBox(64, "TEST", "测试,你选择了第三个项!", 3)
EndIf
EndSwitch
WEnd
EndFunc ;==>Example
|