魔导 发表于 2012-2-10 02:31:34

单选框 和 复选框 选好后再启动? 《已解决》

本帖最后由 魔导 于 2012-2-14 01:19 编辑

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

答案在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里面的 按钮 和 选框 都是一样的

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

#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

netegg 发表于 2012-2-10 04:46:35

这么简单的东西,自己把逻辑想明白就行了,这类代码还是别麻烦大家了

魔导 发表于 2012-2-10 10:56:47

回复 2# netegg


    不是我不弄啊    是我不知道代码
      按钮的点击代码{:1_578:}   已经找到了
       单选   和   复选的
       您给个代码啊

魔导 发表于 2012-2-10 11:00:53

回复 2# netegg


您是元老啊,当然很简单   可我两代码都找不到啊{:1_589:}
    请给两个代码我就会自己弄了谢谢元老{:1_578:}

afan 发表于 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


    感谢版主指点{:1_588:}
    我弄好以后一定会把源码发上来跟大家分享的

魔导 发表于 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)
   结果是复选有没有打勾跟在后面的单选都可以用
   希望版主可以给个列子货再指点指点   
    谢谢超级版主   {:1_588:}

netegg 发表于 2012-2-11 02:56:12

本帖最后由 netegg 于 2012-2-13 11:46 编辑

回复 7# 魔导

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

Example()

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

$checkbox = 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 = GUICtrlCreateCheckbox("CHECKBOX 1", 10, 90, 120, 20)
        ;        $checkbox = GUICtrlCreateCheckbox("CHECKBOX 1", 10,120, 120, 20)

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

    ; 运行界面,直到窗口被关闭
    While 1
       $msg = GUIGetMsg()
       If $msg = $checkbox Then
      For $i = 0 To 4
         ; GUICtrlSetState($radio[$i], BitShift(GUICtrlRead($checkbox), -5) * (BitAND(GUICtrlRead($checkbox), 1) + 1))
         ; GUICtrlSetState($radio[$i], BitShift(BitShift(GUICtrlRead($checkbox), -5), - BitAND(GUICtrlRead($checkbox), 1)))
          GUICtrlSetState($radio[$i], BitShift(GUICtrlRead($checkbox), -5 - BitAND(GUICtrlRead($checkbox), 1)))
      Next
      EndIf
      If $msg = $GUI_EVENT_CLOSE Then ExitLoop
   WEnd
EndFunc   ;==>Example

多说一句,有兴趣的tx想想通过什么位运算使1变成64,4变成128(同时成立)就是这个解
三行代码效果相同,还要在考虑考虑怎么把负号去掉

netegg 发表于 2012-2-11 05:06:31

回复 4# 魔导

还是那句话,通读帮助去,起码基本函数部分读完再喊着要代码,之所以给你那段,是因为一直在折腾位运算,练手罢了

zyfzyj 发表于 2012-2-11 09:41:29

看看!学习下!!!

魔导 发表于 2012-2-11 11:02:57

回复 8# netegg


    多谢   元老指点    还给了列子
   希望元老多多的   (多说一句)
   小弟对所有不懂的东西都非常感兴趣{:1_580:}

魔导 发表于 2012-2-11 11:05:39

回复 8# netegg


现在就去   写代码看帮助
在此谢谢元老   指点迷津{:1_588:}

魔导 发表于 2012-2-11 22:54:59

回复 10# zyfzyj


    学习到了吗?
如果有的话拿出来分享分享啊{:1_578:}

myunicon6 发表于 2012-2-12 19:19:30

GUICtrlSetState($radio[$i], (2-Mod(GUICtrlRead($checkbox),4))*64)

魔导 发表于 2012-2-13 01:29:56

回复 14# myunicon6


    谢谢分享
{:1_498:}
页: [1] 2 3
查看完整版本: 单选框 和 复选框 选好后再启动? 《已解决》