回复 netegg
我写了4个小脚本 想让这个界面上有4个选择项 选中其中几个 或者全选 能让4个脚本按 ...
吕偏执先生 发表于 2013-4-24 09:41
没搞明白你想要那样?
我的理解是:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#region ### START Koda GUI section ### Form=
Local $Radio[4]
$Form1 = GUICreate("Form1", 218, 449, 192, 114)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Radio[0] = GUICtrlCreateCheckbox("Radio1", 48, 32, 113, 17)
$Radio[1] = GUICtrlCreateCheckbox("Radio2", 48, 88, 113, 17)
$Radio[2] = GUICtrlCreateCheckbox("Radio3", 56, 136, 113, 17)
$Radio[3] = GUICtrlCreateCheckbox("Radio4", 56, 192, 113, 17)
$Button1 = GUICtrlCreateButton("Button1", 72, 280, 75, 25)
GUICtrlSetOnEvent(-1, "Button1Click")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
Sleep(10)
WEnd
Func Button1Click()
If GUICtrlRead($Radio[0]) = $GUI_CHECKED Then
MsgBox(0, '', '你选择了' & GUICtrlRead($Radio[0],1))
EndIf
If GUICtrlRead($Radio[1]) = $GUI_CHECKED Then
MsgBox(0, '', '你选择了' & GUICtrlRead($Radio[1],1))
EndIf
If GUICtrlRead($Radio[2]) = $GUI_CHECKED Then
MsgBox(0, '', '你选择了' & GUICtrlRead($Radio[3],1))
EndIf
If GUICtrlRead($Radio[3]) = $GUI_CHECKED Then
MsgBox(0, '', '你选择了' & GUICtrlRead($Radio[3],1))
EndIf
EndFunc ;==>Button1Click
Func Form1Close()
Exit
EndFunc ;==>Form1Close
|