Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #cs ----------------------------------------------------------------------------
- AutoIt Version: 3.3.8.1
- Author: http://SerW.name
- Script Function:
- 7z920-x64 installation, configuration and localization AutoIt script.
- #ce ----------------------------------------------------------------------------
- ; Åñëè ñêðèïò íå ðàáîòàåò íà áîëåå ïîçäíèõ âåðñèÿõ ïðîãðàìì, ÷åì òå, äëÿ êîòîðîé
- ; áûë íàïèñàí èçíà÷àëüíî, îáðàòèòå âíèìàíèå íà ñòðîêè 30 è 31
- ; Ïðåäîòâðàùåíèå âîçìîæíîñòè ìíîæåñòâåííîãî çàïóñêà ñêðèïòà
- If WinExists(@ScriptName) Then Exit
- AutoItWinSetTitle(@ScriptName)
- ; Îòîáðàæàòü òåêóùóþ ñòðîêó ñöåíàðèÿ ñ ïîìîùüþ èíäèêàòîðà ñèñòåìíîé ïàíåëè â ðåæèìå îòëàäêè.
- AutoItSetOption("TrayIconDebug", 1)
- AutoItSetOption("SendKeyDelay", 10)
- #include <File.au3>
- $sPath = @ScriptDir ; ïóòü ê êàòàëîãó, ãäå ëåæèò *.msi ôàéë
- $aMsiFiles = _FileListToArray($sPath, "7z*.msi", 1)
- If $aMsiFiles <> 0 Then ; åñëè íàéäåí õîòÿ áû îäèí ôàéë, òî âûïîëíÿåì óñëîâèå
- ShellExecute ($sPath & "\" & $aMsiFiles[1]) ; çàïóñêàåì ïåðâûé ôàéë
- EndIf
- Global $Title='7-Zip'
- Global $Title1='Options'
- ; Welcome to the 7-Zip 9.20 Setup Wizard
- WinWaitActive($Title)
- Send("!n")
- ; End-User License Agreement
- WinWaitActive($Title, "License Agreement")
- Send("{SPACE}")
- Send("!n")
- ; Custom Setup
- WinWaitActive($Title, "Tree of selections")
- Send("{DOWN 2}")
- Send("{SPACE}")
- Send("{DOWN 3}")
- Send("{ENTER}")
- Send("!n")
- ; Ready to Install
- WinWaitActive($Title, "Install")
- Send("!i")
- ; Choose Components
- WinWaitActive($Title)
- Send("!i")
- ; Completing the 7-Zip 9.20 Setup Wizard
- WinWaitActive($Title, "Finish")
- Send("!f")
- ; Configuration
- Run(@ProgramFilesDir & '\7-Zip\7zFM.exe')
- ; Options
- WinWaitActive("7-Zip File Manager")
- Send("{F9}")
- Send("!t")
- Send("{o}")
- ; System
- WinWaitActive($Title1, "System")
- ControlClick($Title1, "System", "Button1")
- ControlClick($Title1, "System", "SysListView321")
- Send("{DOWN 13}")
- Send("{SPACE}")
- ; 7-Zip
- Send("^{TAB}")
- Send("{TAB 2}")
- dim $var1
- For $var1=0 to 2
- Send("{DOWN}")
- Send("{SPACE}")
- Next
- Send("{DOWN 3}")
- Send("{SPACE}")
- Send("{DOWN}")
- dim $var2
- For $var2=0 to 4
- Send("{DOWN}")
- Send("{SPACE}")
- Next
- ; Settings
- Send("^{TAB 3}")
- Send("!s") ; &Single-click to open an item
- ; Êîïèðóåì ðóññêóþ ëîêàëèçàöèþ
- FileCopy('Lang\*.*', @ProgramFilesDir & '\7-Zip\Lang\', 9)
- ; Language
- WinWaitActive($Title1, "Settings")
- Send("^{TAB}")
- Send("{DOWN}") ; Âûáîð ðóññêîãî ÿçûêà
- Send("{ENTER}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement