читать дальше »
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.2.10.0
Author: radix
Babylon 7.0.1.4 Pro
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
Opt("TrayIconDebug", 1)
Opt("SendKeyDelay", 200)
; Executable file name
$EXECUTABLE = "Setup32.exe"
; I already purchase a license
$license = 0
; User name
$Username = ""
; License code
$Licensecode = ""
; Add desktop icon
$desktopicon = 0
; Add Quick Launch icon
$QuickLaunchicon = 0
; Make Babylon my default search engine
$searchengine = 0
; Make Babylon Search my home page
$homepage = 0
; Install Babylon toolbar
$toolbar = 0
; Installation folder
$INSTALLLOCATION = @ProgramFilesDir & "\Babylon\Babylon-Pro"
; Choose Activation Mouse Button (only one of the three next variables must be equal with 1!)
; Right Mouse Button + Ctrl
$RightMouseButtonCtrl = 1
; Right Mouse Button + Shift
$RightMouseButtonShift = 0
; Middle Mouse Button
$MiddleMouseButton = 0
; Babylon Updates (if you want to receive Babylon updates then set the next variable equal with 1 and enter your email address below inside quotes)
$Updates = 0
; Email address (if you want to receive Babylon updates, enter your email address below inside quotes)
$Email = ""
; LingoZ by Babylon desktop shortcut
$LingoZshortcut = 0
; Run Babylon at Windows startup
$startup = 0
If FileExists($INSTALLLOCATION & "\Babylon.exe") Then
MsgBox(0x40010, @ScriptName, "Please uninstall previous version of Babylon before using this script", 4)
Exit
EndIf
; Settings
RegWrite("HKLM\SOFTWARE\Babylon\Babylon Client\DefaultSettings", "InterfaceLanguage", "REG_SZ", "English")
; Run the installer
Run($EXECUTABLE)
; Setup Language
WinWaitActive("Welcome", "Setup Language")
ControlClick("Welcome", "", "Button2")
; Start
WinWaitActive("Enter Licensing Information", "Start")
If $license = 1 Then
ControlCommand("Enter Licensing Information", "", "Button3", "Check", "")
ControlSetText("Enter Licensing Information", "", "Edit1", "")
Sleep(1000)
ControlSetText("Enter Licensing Information", "", "Edit1", $Username)
ControlSetText("Enter Licensing Information", "", "Edit2", "")
Sleep(1000)
ControlSetText("Enter Licensing Information", "", "Edit2", $Licensecode)
EndIf
ControlClick("Enter Licensing Information", "", "Button4")
; Please read the following License Agreement.
WinWaitActive("Software License Agreement", "Please read the following License Agreement.")
ControlClick("Software License Agreement", "", "Button1")
; Choose installation type:
WinWaitActive("Installation Type", "Choose installation type:")
ControlCommand("Installation Type", "", "Button2", "Check", "")
If $desktopicon = 0 Then
ControlCommand("Installation Type", "", "Button3", "UnCheck", "")
EndIf
If $QuickLaunchicon = 0 Then
ControlCommand("Installation Type", "", "Button4", "UnCheck", "")
EndIf
If $searchengine = 0 Then
ControlCommand("Installation Type", "", "Button5", "UnCheck", "")
EndIf
If $homepage = 0 Then
ControlCommand("Installation Type", "", "Button6", "UnCheck", "")
EndIf
If $toolbar = 0 Then
ControlCommand("Installation Type", "", "Button7", "UnCheck", "")
EndIf
ControlSetText("Installation Type", "", "Edit1", "")
Sleep(1000)
ControlSetText("Installation Type", "", "Edit1", $INSTALLLOCATION)
ControlClick("Installation Type", "", "Button10")
; Choose Activation Mouse Button
WinWaitActive("Setup Complete", "Choose Activation Mouse Button")
If $RightMouseButtonShift = 1 Then
ControlCommand("Setup Complete", "", "Button3", "Check", "")
EndIf
If $MiddleMouseButton = 1 Then
ControlCommand("Setup Complete", "", "Button4", "Check", "")
EndIf
If $Updates = 0 Then
ControlCommand("Setup Complete", "", "Button6", "UnCheck", "")
EndIf
If $Updates = 1 Then
ControlSetText("Setup Complete", "", "Edit1", "")
Sleep(1000)
ControlSetText("Setup Complete", "", "Edit1", $Email)
EndIf
ControlCommand("Setup Complete", "", "Button7", "UnCheck", "")
ControlClick("Setup Complete", "", "Button8")
SLeep(2000)
; Delete LingoZ by Babylon.lnk
If $LingoZshortcut = 0 Then
FileDelete(@DesktopCommonDir & "\LingoZ by Babylon.lnk")
EndIf
; Prevent Babylon Client to run at Windows startup
If $startup = 0 Then
RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Babylon Client")
EndIf