找回密码
 加入
搜索
查看: 1043|回复: 4

单选与确定键的控制?

[复制链接]
发表于 2009-9-24 11:36:18 | 显示全部楼层 |阅读模式
本帖最后由 xj206 于 2009-9-24 16:56 编辑

按下一个RADIO单选,再按BUTTON,执行程序。
如何实现?
发表于 2009-9-24 12:08:00 | 显示全部楼层
是不是你要的?
#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

评分

参与人数 1金钱 +5 贡献 +5 收起 理由
afan + 5 + 5

查看全部评分

发表于 2009-9-24 12:08:52 | 显示全部楼层
 楼主| 发表于 2009-9-24 16:57:03 | 显示全部楼层
3Q
 楼主| 发表于 2009-9-24 16:57:08 | 显示全部楼层
3Q
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-4 13:55 , Processed in 0.076259 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表