#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_UseUPX=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Process.au3>
#Region ### START Koda GUI section ### Form=
Local $LSbox[6]
$Form1 = GUICreate("Form1", 656, 421, -1, -1)
$LSbox[01] = GUICtrlCreateCheckbox("123", 125, 20, 300, 17)
$LSbox[02] = GUICtrlCreateCheckbox("456", 125, 41, 310, 17)
$LSbox[03] = GUICtrlCreateCheckbox("789", 125, 62, 310, 17)
$LSbox[04] = GUICtrlCreateCheckbox("321", 125, 83, 300, 17)
$LSbox[05] = GUICtrlCreateCheckbox("258", 125, 104, 300, 17)
$LSBut01 = GUICtrlCreateButton("全 选", 500, 360, 60, 25)
$LSBut02 = GUICtrlCreateButton("应 用", 570, 360, 60, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $LSBut01
For $i = 1 To 5
GUICtrlSetState($LSbox[$i], $GUI_CHECKED)
Next
Case $LSBut02
If Not _CK() Then ContinueLoop MsgBox(48, '问题', '未做任何选择')
MsgBox(64, 'Ok', '执行')
EndSwitch
WEnd
Func _CK()
For $i = 1 To 5
If GUICtrlRead($LSbox[$i]) = 1 Then Return 1
Next
Return 0
EndFunc ;==>_CK
|