找回密码
 加入
搜索
查看: 1676|回复: 2

[GUI管理] [已解决]选择$idRadio_2还是出现$idRadio_1的参数,这个要怎么写

[复制链接]
发表于 2016-10-25 09:38:56 | 显示全部楼层 |阅读模式
本帖最后由 lufo1989 于 2016-10-25 09:54 编辑
Func Example()
        Opt("GUICoordMode", 1)

        GUICreate("琅凌安装器", 155, 382, 454, 213)

        ; Create the controls
        Local $idButton_1 = GUICtrlCreateButton("确认安装", 22, 4, 110, 40)
        GUICtrlCreateGroup("选择项目安装软件", 22, 58, 109, 308)
        GUIStartGroup()
        Local $idRadio_1 = GUICtrlCreateRadio("劲舞团", 26, 88, 102, 20)
        Local $idRadio_2 = GUICtrlCreateRadio("劲舞团1", 26, 118, 100, 20)
        Local $idRadio_3 = GUICtrlCreateRadio("劲舞团2", 26, 148, 98, 20)
        Local $idRadio_4 = GUICtrlCreateRadio("劲舞团3", 26, 178, 96, 20)
        Local $idRadio_5 = GUICtrlCreateRadio("劲舞团4", 26, 208, 94, 20)
        Local $idRadio_6 = GUICtrlCreateRadio("劲舞团5", 26, 238, 92, 20)
        Local $idRadio_7 = GUICtrlCreateRadio("劲舞团6", 26, 268, 90, 20)
        Local $idRadio_8 = GUICtrlCreateRadio("劲舞团7", 26, 298, 88, 20)
        Local $idRadio_9 = GUICtrlCreateRadio("劲舞团8", 26, 328, 86, 20)


        ; Init our vars that we will use to keep track of GUI events
        Local $iRadioVal1 = 0
        ; Show the GUI
        GUISetState(@SW_SHOW)

        ; In this message loop we use variables to keep track of changes to the radios, another
        ; way would be to use GUICtrlRead() at the end to read in the state of each control
        While 1
                $msg = GUIGetMsg()
                Select
                        Case $msg = $GUI_EVENT_CLOSE
                                MsgBox($MB_SYSTEMMODAL, "", "确定要退出软件吗?")
                                ExitLoop
                        Case $msg = $GUI_EVENT_MINIMIZE
                                MsgBox($MB_SYSTEMMODAL, "", "软件最小化成功", 2)


                        Case $msg = $idButton_1
                                FileCreateShortcut("D:\劲舞团\xx.exe",@DesktopDir&"\劲舞团.lnk","","/o hsdb_劲舞团")
                                MsgBox($MB_SYSTEMMODAL, "", "软件安装完成" & @CRLF & "请在桌面运行软件" & $iRadioVal1)
                        
                        Case $msg >= $idRadio_1 And $msg <= $idRadio_9
                                $iRadioVal1 = $msg - $idRadio_1

                EndSelect
        WEnd

        GUIDelete()
EndFunc   ;==>Example
 楼主| 发表于 2016-10-25 09:45:00 | 显示全部楼层
找了很多帮助都没有这个,新手小白又不怎么会这段代码,选择$idRadio_1就有1的桌面创建参数,选择$idRadio_2就有2的桌面创建参数,不想丢弃Local $idButton_1 = GUICtrlCreateButton("确认安装", 22, 4, 110, 40)的指令,
 楼主| 发表于 2016-10-25 09:54:03 | 显示全部楼层
自己已找到方法,已解决
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-26 12:36 , Processed in 0.075312 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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