单选与确定键的控制?
本帖最后由 xj206 于 2009-9-24 16:56 编辑按下一个RADIO单选,再按BUTTON,执行程序。
如何实现? 是不是你要的?#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("很简单的", 200, 220)
$Button1 = GUICtrlCreateButton("读取控件状态", 20, 150, 100, 30, $WS_GROUP)
$Button11 = GUICtrlCreateRadio(" 10sec", 20, 50, 150, 25, 0)
$Button12 = GUICtrlCreateRadio(" 20sec", 20, 80, 150, 25, 0)
$Button13 = GUICtrlCreateRadio(" 30sec", 20, 110, 150, 25, 0)
GUICtrlSetState(-1,$GUI_CHECKED)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If GUICtrlRead($Button11) = 1 Then MsgBox(0, "读取结果", "10sec被选中")
If GUICtrlRead($Button12) = 1 Then MsgBox(0, "读取结果", "20sec被选中")
If GUICtrlRead($Button13) = 1 Then MsgBox(0, "读取结果", "30sec被选中")
case $Button11
case $Button12
case $Button13
EndSwitch
Wend 学会使用搜索吧!
http://www.autoitx.com/forum.php?mod=viewthread&tid=665&page=1#pid91381 3Q:face (37): 3Q:face (37):
页:
[1]