临时写的,希望能给你些启发。#include <GUIConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 251, 251, 192, 124)
$Checkbox1 = GUICtrlCreateCheckbox("复选框", 80, 72, 97, 17)
$Button1 = GUICtrlCreateButton("测试", 78, 150, 100, 30, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Checkbox1
Case $Button1
$i=GUICtrlRead($Checkbox1)
If $i=1 Then
MsgBox(0,"复选框状态","复选框已勾选")
ElseIf $i=4 Then
MsgBox(0,"复选框状态","复选框没有勾选")
EndIf
EndSwitch
WEnd
|