Micro Duo教室之AutoIt 自動安裝開班授課 第四課
本帖最後由 rictirse 於 2012-11-5 23:40 編輯第四課教 模組化的 安裝
非常方便修改與維護 一個自動安裝大概只需要4~5分鐘就可以完成了!!
看影片教學最簡單惹!!!
http://www.youtube.com/v/U6iN9ElxRfo#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Author: Dang Wang
Script Function: Install DEMO
Template AutoIt script.
#ce ----------------------------------------------------------------------------
#NoTrayIcon
AutoItSetOption ( "WinTitleMatchMode", 4)
GUISetIcon(@ScriptDir&"/NewDang.ico")
Dim Const $FileName= ""
Dim Const $FormName = ""
;------- (1 Click;2 Check;3 UnCheck;4 SetText )-------
;------- (TitleName, Text, ControlID , Flag↑, SetText)-------
Dim $Text = [ [ $FormName, "Enter Text", "ButtonName", 1, ""], _
[ $FormName, "Enter Text", "ButtonName", 1, ""], _
[ $FormName, "Enter Text", "ButtonName", 1, ""] ]
$begin = TimerInit()
While 1
For $i = 0 To UBound ( $Text, 1)-1
Select
Case WinExists ( $Text[$i], $Text[$i])
If $Text[$i] = 1 Then
ControlClick ( $Text[$i], $Text[$i], $Text[$i])
ElseIf $Text[$i] = 2 Then
ControlCommand ( $Text[$i], $Text[$i], $Text[$i], "Check", "")
ElseIf $Text[$i] = 3 Then
ControlCommand ( $Text[$i], $Text[$i], $Text[$i], "UnCheck", "")
ElseIf $Text[$i] = 4 Then
ControlSetText ( $Text[$i], $Text[$i], $Text[$i], $Text[$i])
EndIf
If $i = (UBound ( $Text, 1)-1) Then ExitLoop(2)
EndSelect
Next
WEnd
_Patch()
$dif = TimerDiff($begin)
MsgBox ( 0, "安裝完成", StringFormat ( "總安裝時間:%s秒", $dif/1000))
頁:
[1]