lufo1989 发表于 2016-10-25 09:38:56

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

本帖最后由 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

lufo1989 发表于 2016-10-25 09:45:00

找了很多帮助都没有这个,新手小白又不怎么会这段代码,选择$idRadio_1就有1的桌面创建参数,选择$idRadio_2就有2的桌面创建参数,不想丢弃Local $idButton_1 = GUICtrlCreateButton("确认安装", 22, 4, 110, 40)的指令,

lufo1989 发表于 2016-10-25 09:54:03

自己已找到方法,已解决
页: [1]
查看完整版本: [已解决]选择$idRadio_2还是出现$idRadio_1的参数,这个要怎么写