【已解决】刚刚以为成功了还是没成功继续求助,帖子转移太快了,
本帖最后由 lufo1989 于 2017-2-8 18:07 编辑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找了很多帮助都没有这个,新手小白又不怎么会这段代码,选择$idRadio_1就有1的桌面创建参数,选择$idRadio_2就有2的桌面创建参数,不想丢弃Local $idButton_1 = GUICtrlCreateButton("确认安装", 22, 4, 110, 40)的指令, 本帖最后由 liuyilun 于 2016-10-25 14:28 编辑
你要不同的参数能不能给个列子或者规律不然不好写啊 选择了劲舞团1就按上面的确认安装,然后桌面出现快捷方式是一样的,只是快捷方式的参数不一样 select
case BitAND(GUICtrlRead($idRadio_1), $GUI_CHECKED)
do you want do
case BitAND(GUICtrlRead($idRadio_2), $GUI_CHECKED)
do you want do
endselect #include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include-once
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,$canshu=""
; 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", "", $canshu)
MsgBox($MB_SYSTEMMODAL, "", "软件安装完成" & @CRLF & "请在桌面运行软件" & $iRadioVal1)
Case $msg >= $idRadio_1 And $msg <= $idRadio_9
$iRadioVal1 = $msg - $idRadio_1
Switch $iRadioVal1
Case 0
$canshu="/0"
Case 1
$canshu="/2"
.
.
.
.
Case 8
$canshu ="/8"
EndSwitch
EndSelect
WEnd
GUIDelete()
当中你自己填吧 本帖最后由 kk_lee69 于 2016-11-3 15:29 编辑
回复 1# lufo1989
很困難嗎???
安裝的時候加個判斷不就好了
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_勁舞團")
IF $iRadioVa=5 Then
; FileCreateShortcut("D:\勁舞團\xx.exe",@DesktopDir&"\勁舞團.lnk","","/o hsdb_勁舞團")
MsgBox(0, "", "安裝中" & @CRLF & "複製勁舞團1檔案" )
ElseIf $iRadioVa=6 Then
; FileCreateShortcut("D:\勁舞團\xx.exe",@DesktopDir&"\勁舞團.lnk","","/o hsdb_勁舞團")
MsgBox(0, "", "安裝中" & @CRLF & "複製勁舞團2檔案" )
ElseIf $iRadioVa=7 Then
ElseIf $iRadioVa=8 Then
ElseIf $iRadioVa=9 Then
ElseIf $iRadioVa=10 Then
ElseIf $iRadioVa=11 Then
ElseIf $iRadioVa=12 Then
ElseIf $iRadioVa=13 Then
MsgBox(0, "", "安裝中" & @CRLF & "複製勁舞團9檔案" )
EndIf
MsgBox(0, "", "軟體安裝完成" & @CRLF & "請在桌面運行軟體" & $iRadioVal1)
Case $msg >= $idRadio_1 And $msg <= $idRadio_9
$iRadioVa = $msg
$iRadioVal1 = $msg - $idRadio_1
ConsoleWrite($MSG&@CRLF)
EndSelect
WEnd
GUIDelete()
EndFunc ;==>Example
页:
[1]