本帖最后由 水木子 于 2010-11-22 17:48 编辑
大家好!
忙了一天,也热了一天,衣服都被汗水打湿了好几次,哎!辛苦啊!
终于下班了,又来继续学习Autoit3。
求助大家一个关于一键“全选\反选”的问题,下面是我简单做的窗体代码,我自己试着写了些,虽然能实现全选,但是反选就出问题,而且感觉方法很笨见不得人,琢磨半天未果,“搜索”里关于这方面的问题也少得很!这才问问大家。
希望各位前辈能抽空指点下。#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("全选\反选", 260, 250)
$Checkbox1 = GUICtrlCreateCheckbox("1", 50, 50, 25, 17)
$Checkbox2 = GUICtrlCreateCheckbox("2", 120, 50, 25, 17)
$Checkbox3 = GUICtrlCreateCheckbox("3", 190, 50, 25, 17)
$Checkbox4 = GUICtrlCreateCheckbox("4", 50, 100, 25, 17)
$Checkbox5 = GUICtrlCreateCheckbox("5", 120, 100, 25, 17)
$Checkbox6 = GUICtrlCreateCheckbox("6", 190, 100, 25, 17)
$Checkbox7 = GUICtrlCreateCheckbox("7", 50, 150, 25, 17)
$Checkbox8 = GUICtrlCreateCheckbox("8", 120, 150, 25, 17)
$Checkbox9 = GUICtrlCreateCheckbox("9", 190, 150, 25, 17)
$Group1 = GUICtrlCreateGroup("10", 24, 24, 209, 169)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("全选\反选", 90, 210, 75, 25, $WS_GROUP)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Checkbox1
Case $Checkbox2
Case $Checkbox3
Case $Checkbox4
Case $Checkbox5
Case $Checkbox6
Case $Checkbox7
Case $Checkbox8
Case $Checkbox9
Case $Button1
EndSwitch
WEnd
|