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