|
我想弄个软件自动安装程序,如示例,如果我全选了再点开始安装,就会一起执行所选的所有软件,如何让它按顺序来一个个的安装呢?请大家指点一二,谢谢了。
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 219, 168, 193, 125)
$Checkbox1 = GUICtrlCreateCheckbox("千千静听", 24, 24, 73, 25)
$Checkbox2 = GUICtrlCreateCheckbox("迅雷", 24, 55, 73, 33)
$Button1 = GUICtrlCreateButton("开始安装", 50, 130, 80, 25)
$Check = GUICtrlCreateCheckbox("全选", 50, 100, 209)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg=$Button1
_res()
Case $msg=$Check
_Check()
EndSelect
WEnd
Func _Check()
$Choose=GUICtrlRead($Check )
Switch $Choose
Case 1
GUICtrlSetState ($Checkbox1, $GUI_CHECKED)
GUICtrlSetState ($Checkbox2, $GUI_CHECKED)
Case 4
GUICtrlSetState ($Checkbox1, $GUI_UNCHECKED)
GUICtrlSetState ($Checkbox2, $GUI_UNCHECKED)
EndSwitch
EndFunc
Func _res()
If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
run ("F:\au3\q.exe")
EndIf
If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then
run ("F:\au3\x.exe")
EndIf
EndFunc
[ 本帖最后由 botanycc 于 2008-5-10 19:55 编辑 ] |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
|