找回密码
 加入
搜索
查看: 14228|回复: 33

[GUI管理] 单选框 和 复选框 选好后再启动? 《已解决》

 火.. [复制链接]
发表于 2012-2-10 02:31:34 | 显示全部楼层 |阅读模式
本帖最后由 魔导 于 2012-2-14 01:19 编辑

此贴得到各超级版主和元老的照顾  终于解决了   在这里再次感谢各位前辈的点拨和照顾   谢谢

答案在31楼   建议像我一样比较愚笨的   一楼一楼看下去   会受益匪浅的


如图一样    样子做了   不知道怎么跟函数联系起来   请各位大大指点  

问题1    复选框 选中后   跟在后面的8个单选框才可以用
        复选框 如果  没选  跟在后面的8个就不用

问题2   在选择好  复选 和 单选 后 点击 开始就启动

问题3   循序是         JS01(XD上--XD下--BT上--BT下--ND上--ND下--SL上--SL下--DF上--DF下--KN上--KN下--背包--信任)
--JS02(同JS1)--JS03(同JS1)----JS04(同JS1)----JS05(同JS1)----JS06(同JS1)----JS07(同JS1)----JS08 (同JS1)--

解释: JS01     至   JS08  里面的 按钮 和 选框 都是一样的

   谢谢各位先
源码是这样的    知道有很多问题   可是经验太少  不知道怎么优化   请各位前辈指点

#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
Local $parent1
    Local $tab, $msg,$Button1,$Radio1,$Radio2,$Radio3,$Radio4,$Radio5,$Radio6,$Radio7,$Radio8,$Checkbox1,$Checkbox2,$Input1
        Local $tab0,$msg,$Button1,$Radio1,$Radio2,$Radio3,$Radio4,$Radio5,$Radio6,$Radio7,$Radio8,$Checkbox1,$Checkbox2,$Input1
    Local $tab1,$msg,$Button1,$Radio1,$Radio2,$Radio3,$Radio4,$Radio5,$Radio6,$Radio7,$Radio8,$Checkbox1,$Checkbox2,$Input1
    Local $tab2,$msg,$Button1,$Radio1,$Radio2,$Radio3,$Radio4,$Radio5,$Radio6,$Radio7,$Radio8,$Checkbox1,$Checkbox2,$Input1
            

                
    $parent1 =GUICreate("老板专用>>>调控器",623, 442, 245, 102); will create a dialog box that when displayed is centered

    GUISetBkColor(0xFFFFFF)
    GUISetFont(9, 300)
        
        $Button1 = GUICtrlCreateButton("开始", 545, 416, 75, 25)
        GUICtrlSetOnEvent(-1, "OKPressed")
        
        $Button1 = GUICtrlCreateButton("默认选项",470, 416, 75, 25)
        $Button1 = GUICtrlCreateButton("X角色", 470, 390, 75, 25)
        $Button1 = GUICtrlCreateButton("N角色",545, 390, 75, 25)
        $Button1 = GUICtrlCreateButton("摆放位置",500, 80, 75, 25)
        
        $Checkbox1 = GUICtrlCreateCheckbox("背包",0,400, 40, 15)
        $Checkbox1 = GUICtrlCreateCheckbox("信任",0,420, 40, 15)
        
        $Radio8 = GUICtrlCreateRadio("关机",100,400, 40, 15)
        $Radio8 = GUICtrlCreateRadio("注销",100,420, 40, 15)
        $Radio8 = GUICtrlCreateRadio("重启",140,400, 40, 15)
        $Radio8 = GUICtrlCreateRadio("等待",140,420, 40, 15)
        
        $Input1 = GUICtrlCreateInput("HAO1X", 500, 20, 40, 20)
        $Input1 = GUICtrlCreateInput("HAO1Y", 550, 20, 40, 20)
        $Input1 = GUICtrlCreateInput("HAO2X", 500, 50, 40, 20)
        $Input1 = GUICtrlCreateInput("HAO2Y", 550, 50, 40, 20)
        
        
    $tab = GUICtrlCreateTab(0,0 , 800, 800)
        
    $tab0 = GUICtrlCreateTabItem("JS 01")

        
        
GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("XD<上>", 0, 20, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,20, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,20, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,20, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,20, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,20, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,20, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,20, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,20, 30, 17)

GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox2 = GUICtrlCreateCheckbox("XD<下>", 0, 40, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,40, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,40, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,40, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,40, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,40, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,40, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,40, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,40, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)


GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("BT<上>", 0, 80, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,80, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,80, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,80, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,80, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,80, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,80, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,80, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,80, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99) 
$Checkbox2 = GUICtrlCreateCheckbox("BT<下>", 0, 100, 70,15)

$Radio1 = GUICtrlCreateRadio("A1", 70,100, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,100, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,100, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,100, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,100, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,100, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,100, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,100, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("ND<上>", 0, 140, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,140, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,140, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,140, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,140, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,140, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,140, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,140, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,140, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99) 
$Checkbox2 = GUICtrlCreateCheckbox("ND<下>", 0, 160, 70,15)

$Radio1 = GUICtrlCreateRadio("A1", 70,160, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,160, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,160, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,160, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,160, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,160, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,160, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,160, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("SL<上>", 0, 200, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,200, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,200, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,200, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,200, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,200, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,200, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,200, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,200, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99) 
$Checkbox2 = GUICtrlCreateCheckbox("SL<下>", 0, 220, 70,15)

$Radio1 = GUICtrlCreateRadio("A1", 70,220, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,220, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,220, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,220, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,220, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,220, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,220, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,220, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("DF<上>", 0, 260, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,260, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,260, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,260, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,260, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,260, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,260, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,260, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,260, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99) 
$Checkbox2 = GUICtrlCreateCheckbox("DF<下>", 0, 280, 70,15)

$Radio1 = GUICtrlCreateRadio("A1", 70,280, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,280, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,280, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,280, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,280, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,280, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,280, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,280, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("KN<上>", 0, 320, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,320, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,320, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,320, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,320, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,320, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,320, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,320, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,320, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99) 
$Checkbox2 = GUICtrlCreateCheckbox("KN<下>", 0, 340, 70,15)

$Radio1 = GUICtrlCreateRadio("A1", 70,340, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,340, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,340, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,340, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,340, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,340, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,340, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,340, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)



    $tab1 = GUICtrlCreateTabItem("JS 02")
    
        
GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("XD<上>", 0, 20, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,20, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,20, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,20, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,20, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,20, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,20, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,20, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,20, 30, 17)

GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox2 = GUICtrlCreateCheckbox("XD<下>", 0, 40, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,40, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,40, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,40, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,40, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,40, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,40, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,40, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,40, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)


GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("BT<上>", 0, 80, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,80, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,80, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,80, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,80, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,80, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,80, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,80, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,80, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99) 
$Checkbox2 = GUICtrlCreateCheckbox("BT<下>", 0, 100, 70,15)

$Radio1 = GUICtrlCreateRadio("A1", 70,100, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,100, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,100, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,100, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,100, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,100, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,100, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,100, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("ND<上>", 0, 140, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,140, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,140, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,140, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,140, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,140, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,140, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,140, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,140, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99) 
$Checkbox2 = GUICtrlCreateCheckbox("ND<下>", 0, 160, 70,15)

$Radio1 = GUICtrlCreateRadio("A1", 70,160, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,160, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,160, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,160, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,160, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,160, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,160, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,160, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("SL<上>", 0, 200, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,200, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,200, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,200, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,200, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,200, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,200, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,200, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,200, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99) 
$Checkbox2 = GUICtrlCreateCheckbox("SL<下>", 0, 220, 70,15)

$Radio1 = GUICtrlCreateRadio("A1", 70,220, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,220, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,220, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,220, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,220, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,220, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,220, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,220, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("DF<上>", 0, 260, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,260, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,260, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,260, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,260, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,260, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,260, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,260, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,260, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99) 
$Checkbox2 = GUICtrlCreateCheckbox("DF<下>", 0, 280, 70,15)

$Radio1 = GUICtrlCreateRadio("A1", 70,280, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,280, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,280, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,280, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,280, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,280, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,280, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,280, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("KN<上>", 0, 320, 70, 15)

$Radio1 = GUICtrlCreateRadio("A1", 70,320, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,320, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,320, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,320, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,320, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,320, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,320, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,320, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

GUICtrlCreateGroup("", -99, -99, -99, -99) 
$Checkbox2 = GUICtrlCreateCheckbox("KN<下>", 0, 340, 70,15)

$Radio1 = GUICtrlCreateRadio("A1", 70,340, 30, 17)
$Radio2 = GUICtrlCreateRadio("A4", 100,340, 30, 17)
$Radio3 = GUICtrlCreateRadio("A7", 130,340, 30, 17)
$Radio4 = GUICtrlCreateRadio("D1", 160,340, 30, 17)
$Radio5 = GUICtrlCreateRadio("D8", 190,340, 30, 17)
$Radio6 = GUICtrlCreateRadio("E1", 220,340, 30, 17)
$Radio7 = GUICtrlCreateRadio("E2", 250,340, 30, 17)
$Radio8 = GUICtrlCreateRadio("NO", 280,340, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

 GUICtrlCreateTabItem(""); end tabitem definition

    GUISetState()

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()

        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
        If $msg = $tab Then
            ; display the clicked tab
            WinSetTitle("My GUI Tab", "", "My GUI Tab" & GUICtrlRead($tab))
        EndIf
    WEnd
EndFunc

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2012-2-10 04:46:35 | 显示全部楼层
这么简单的东西,自己把逻辑想明白就行了,这类代码还是别麻烦大家了
 楼主| 发表于 2012-2-10 10:56:47 | 显示全部楼层
回复 2# netegg


    不是我不弄啊    是我不知道代码
      按钮的点击代码   已经找到了
       单选   和   复选的  
       您给个代码啊
 楼主| 发表于 2012-2-10 11:00:53 | 显示全部楼层
回复 2# netegg


您是元老啊,当然很简单   可我两代码都找不到啊
    请给两个代码我就会自己弄了  谢谢元老
发表于 2012-2-10 11:09:40 | 显示全部楼层
If GUICtrlRead(复选框ID) = 1 Then ;已选中
For
GUICtrlSetState(单选框ID, 128) ;128=禁用 64=可用
Next
 楼主| 发表于 2012-2-11 01:24:42 | 显示全部楼层
回复 5# afan


    感谢  版主指点
    我弄好以后一定会把源码发上来跟大家分享的
 楼主| 发表于 2012-2-11 02:00:39 | 显示全部楼层
回复 5# afan [/b 还是没
          还是没弄懂 - -!
         不知道  ID 是多少
      看了帮助后我写成这样了
GUICtrlCreateGroup("", -99, -99, -99, -99)
$Checkbox1 = GUICtrlCreateCheckbox("XD<上>", 0, 20, 70, 15)
If GUICtrlRead($Checkbox1) = 1 Then ;已选中
FOR
GUICtrlSetState($Radio1,64) ;128=禁用 64=可用
NEXT
EndIf

$Radio1 = GUICtrlCreateRadio("A1", 70,20, 30, 17)
$Radio1 = GUICtrlCreateRadio("A4", 100,20, 30, 17)
GUICtrlCreateGroup("", -99, -99, -99, -99)

   结果是复选  有没有打勾  跟在后面的单选都可以用  
   希望版主可以给个列子货再指点指点     
    谢谢  超级版主   
发表于 2012-2-11 02:56:12 | 显示全部楼层
本帖最后由 netegg 于 2012-2-13 11:46 编辑

回复 7# 魔导

group  干什么,单选框如果在同组内只有一个可用
大概给你凑出来了,不过肯定是不对的,只是个意思
点击复选的时候,对所属单选框执行下面的操作就行了,循环设置就行了
大概写了个,肯定不是这样的,只是实现lz要的效果凑出来的数而已,正确的慢慢再想吧
[au3]#include <GUIConstantsEx.au3>

Example()

Func Example()
  Local $msg, $checkbox[3], $radio[5]
  GUICreate("My GUI Checkbox") ; 创建一个对话框,并居中显示

  $checkbox[0] = GUICtrlCreateCheckbox("CHECKBOX 1", 10, 10, 120, 20)
  For $i = 0 To 4
    $radio[$i] = GUICtrlCreateRadio('radio', 10, ($i + 2) * 20, 130.20)
    GUICtrlSetState(-1, $gui_disable)
  Next
        ;        $checkbox[1] = GUICtrlCreateCheckbox("CHECKBOX 1", 10, 90, 120, 20)
        ;        $checkbox[2] = GUICtrlCreateCheckbox("CHECKBOX 1", 10,120, 120, 20)

    GUISetState() ; 显示有复选框(Checkbox)控件的对话框

    ; 运行界面,直到窗口被关闭
    While 1
       $msg = GUIGetMsg()
       If $msg = $checkbox[0] Then
        For $i = 0 To 4
         ; GUICtrlSetState($radio[$i], BitShift(GUICtrlRead($checkbox[0]), -5) * (BitAND(GUICtrlRead($checkbox[0]), 1) + 1))
         ; GUICtrlSetState($radio[$i], BitShift(BitShift(GUICtrlRead($checkbox[0]), -5), - BitAND(GUICtrlRead($checkbox[0]), 1)))
          GUICtrlSetState($radio[$i], BitShift(GUICtrlRead($checkbox[0]), -5 - BitAND(GUICtrlRead($checkbox[0]), 1)))
        Next
      EndIf
      If $msg = $GUI_EVENT_CLOSE Then ExitLoop
   WEnd
EndFunc   ;==>Example
[/au3]
多说一句,有兴趣的tx想想通过什么位运算使1变成64,4变成128(同时成立)就是这个解
三行代码效果相同,还要在考虑考虑怎么把负号去掉
发表于 2012-2-11 05:06:31 | 显示全部楼层
回复 4# 魔导

还是那句话,通读帮助去,起码基本函数部分读完再喊着要代码,之所以给你那段,是因为一直在折腾位运算,练手罢了
发表于 2012-2-11 09:41:29 | 显示全部楼层
看看!学习下!!!
 楼主| 发表于 2012-2-11 11:02:57 | 显示全部楼层
回复 8# netegg


    多谢   元老  指点    还给了列子
   希望元老  多多的   (多说一句)  
   小弟对所有不懂的东西都非常感兴趣  
 楼主| 发表于 2012-2-11 11:05:39 | 显示全部楼层
回复 8# netegg


现在就去   写代码  看帮助
在此谢谢元老   指点迷津
 楼主| 发表于 2012-2-11 22:54:59 | 显示全部楼层
回复 10# zyfzyj


    学习到了吗?
如果有的话  拿出来分享分享啊
发表于 2012-2-12 19:19:30 | 显示全部楼层
GUICtrlSetState($radio[$i], (2-Mod(GUICtrlRead($checkbox[0]),4))*64)
 楼主| 发表于 2012-2-13 01:29:56 | 显示全部楼层
回复 14# myunicon6


    谢谢分享
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-18 03:26 , Processed in 0.087738 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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