Opt('TrayIconDebug', 1) $Pid=Run("DivXInstaller.exe") ; Start checking for six windows with "Updates detected", "Free! Include the Google Chrome web browser", "Stay updated with DivX through the FREE Yahoo! Toolbar", ; "Add the free Yahoo! Toolbar", "Add Yahoo! Toolbar and IE7 Optimized for Yahoo! for free", "Sign up for the DivX newsletter!" text ; inside them and for Internet Explorer, Mozilla Firefox, Opera and New Connection Wizard processes AdlibEnable('_Adlib', 1000) $title = "Installation de DivX for Windows" $title1 = "DivX for Windows Setup" If RegRead("HKCU\Control Panel\International", "sLanguage") = "FRA" Then ;Language If WinWait("Sélection de la langue", "", 10) Then ;ControlSetText("Sélection de la langue", "", "ComboBox1", "French") ControlSend("Sélection de la langue", "", "ComboBox1", "Français") Send("{SPACE}") ControlClick("Sélection de la langue", "", "Button1") EndIf ;Bienvenue WinWaitActive($title, "Bienvenue") ControlClick($title, "Bienvenue", "Button2") ;Licence WinWaitActive($title, "Licence utilisateur") ;ControlCommand($title, "Licence utilisateur", "Button4", "Check", "") ControlClick($title, "Licence utilisateur", "Button4") ControlClick($title, "Licence utilisateur", "Button2") ;Addenda ;WinWaitActive($title, "Addenda") ;ControlCommand($title, "Addenda", "Button4", "Check", "") ;ControlClick($title, "Addenda", "Button2") ;composants WinWaitActive($title, "Choisissez les composants") ControlClick($title, "Choisissez les composants", "Button2") ;destination WinWaitActive($title, "Choisissez le dossier") ;ControlSetText($title, "Choisissez le dossier", "Edit1", "C:\Program Files\DivX" ) ControlClick($title, "Choisissez le dossier", "Button2") ;FIN WinWaitActive($title, "Installation terminée") Sleep(500) ControlClick($title, "Installation terminée", "Button4"); Associez MKV à DivX Player Sleep(500) ControlClick($title, "Installation terminée", "Button2") ;;WinWait($title, "Votre ordinateur doit être redémarré") ;;ControlClick($title, "Votre ordinateur doit être redémarré", "Button2") Sleep(500) Else ;Language If WinWait("Language selection", "", 10) Then ControlClick("Language selection", "", "Button1") EndIf ;Welcome WinWaitActive($title1, "Welcome") ControlClick($title1, "Welcome", "Button2") ; Kill the update window pop-up (delete divx-bundle-updater.ini file from a folder inside %TEMP%) #include ;#include $avDirList = _FileListToArray(@TempDir, "ns*.tmp", 2) ;_ArrayDisplay($avDirList) If IsArray($avDirList) Then For $n = 1 To $avDirList[0] $sPath = @TempDir & "\" & $avDirList[$n] & "\divx-bundle-updater.ini" If FileExists($sPath) Then FileDelete($sPath) EndIf Next EndIf ;License WinWaitActive($title1, "License Agreement") ControlCommand($title1, "License Agreement", "Button4", "Check", "") ControlClick($title1, "License Agreement", "Button2") ;Addenda ;WinWaitActive($title1, "License Agreement Addenda") ;ControlCommand($title1, "License Agreement Addenda", "Button4", "Check", "") ;ControlClick($title1, "License Agreement Addenda", "Button2") ;components WinWaitActive($title1, "Choose Components") ControlClick($title1, "Choose Components", "Button2") ;Destination WinWaitActive($title1, "Choose Install Location") ;ControlSetText($title1, "Choose Install Location", "Edit1", "C:\Program Files\DivX" ) ControlClick($title1, "Choose Install Location", "Button2") ;END WinWaitActive($title1, "Installation Complete") ;Sleep(500) ControlClick($title1, "Installation Complete", "Button4"); Associez MKV à DivX Sleep(500) ControlClick($title1, "Installation Complete", "Button2") Sleep(500) EndIf EndIf Func _Adlib() ;French ; Norton™ Security Scan If WinExists($title, "Norton™ Security Scan") Then ControlCommand($title, "Norton™ Security Scan", "Button5", "UnCheck", "") Sleep(500) ControlClick($title, "Norton™ Security Scan", "Button2", "left", 1, 37, 11) EndIf ;Mise à jour disponible If WinExists($title, "Mise à jour disponible") Then ControlClick($title, "Mise à jour disponible", "Button5");Non, je préfère installer cette ancienne version ControlClick($title , "Mise à jour disponible", "Button2") EndIf ; Free! Include the Google Chrome web browser If WinExists($title, "Google") Then ControlCommand($title, "Google", "Button4", "UnCheck", "") Sleep(500) ControlClick($title, "Google", "Button2", "left", 1, 35, 8) EndIf ; Stay updated with DivX through the FREE Yahoo! Toolbar If WinExists($title, "Yahoo") Then WinActivate($title, "Yahoo") ControlCommand($title, "Yahoo", "Button4", "UnCheck", "") Sleep(500) ControlClick($title, "Yahoo", "Button2", "left", 1, 35, 8) EndIf ; Ajoutez la barre d'outils gratuite de Yahoo If WinExists($title, "Ajoutez la barre d'outils gratuite de Yahoo") Then WinActivate($title, "Ajoutez la barre d'outils gratuite de Yahoo") ControlCommand($title, "Ajoutez la barre d'outils gratuite de Yahoor", "Button5", "UnCheck", "") Sleep(500) ControlClick($title, "Ajoutez la barre d'outils gratuite de Yahoo", "Button2", "left", 1, 35, 8) EndIf ; Add Yahoo! Toolbar and IE7 Optimized for Yahoo! for free If WinExists($title, "IE7") Then WinActivate($title, "IE7") ControlCommand($title, "IE7", "Button4", "UnCheck", "") Sleep(500) ControlClick($title, "IE7", "Button2", "left", 1, 35, 8) EndIf ; Abonnez vous If WinExists($title, "Abonnez vous") Then WinActivate($title, "Abonnez vous") ControlClick($title, "Abonnez vous", "Button2", "left", 1, 35, 8) ;WinWaitClose($title, "Abonnez vous", 5) EndIf If WinExists($title, "Votre ordinateur doit être redémarré") Then WinActivate($title, "Votre ordinateur doit être redémarré") ControlClick($title, "Votre ordinateur doit être redémarré", "Button2") EndIf Sleep(500) ;English ; Norton™ Security Scan If WinExists("DivX for Windows Setup", "Norton™ Security Scan") Then ControlCommand("DivX for Windows Setup", "Norton™ Security Scan", "Button5", "UnCheck", "") Sleep(500) ControlClick("DivX for Windows Setup", "Norton™ Security Scan", "Button2", "left", 1, 37, 11) EndIf ;Updates If WinExists($title1, "Updates detected") Then ControlClick($title1, "Updates detected", "Button5");Non, je préfère installer cette ancienne version ControlClick($title1, "Updates detected", "Button2") EndIf ; Free! Include the Google Chrome web browser If WinExists($title1, "Free!") Then ControlCommand($title1, "Free!", "Button4", "UnCheck", "") Sleep(500) ControlClick($title1, "Free!", "Button2", "left", 1, 35, 8) EndIf ; Stay updated with DivX through the FREE Yahoo! Toolbar If WinExists($title1, "Stay updated with DivX through the FREE Yahoo! Toolbar") Then WinActivate($title1, "Stay updated with DivX through the FREE Yahoo! Toolbar") ControlCommand($title1, "Stay updated with DivX through the FREE Yahoo! Toolbar", "Button4", "UnCheck", "") Sleep(500) ControlClick($title1, "Stay updated with DivX through the FREE Yahoo! Toolbar", "Button2", "left", 1, 35, 8) EndIf ; Add the free Yahoo! Toolbar If WinExists($title1, "Add the free Yahoo") Then WinActivate($title1, "Add the free Yahoo") ControlCommand($title1, "Add the free Yahoo", "Button5", "UnCheck", "") Sleep(500) ControlClick($title1, "Add the free Yahoo", "Button2", "left", 1, 35, 8) EndIf ; Add Yahoo! Toolbar and IE7 Optimized for Yahoo! for free If WinExists($title1, "Add Yahoo! Toolbar and IE7 Optimized for Yahoo! for free") Then WinActivate($title1, "Add Yahoo! Toolbar and IE7 Optimized for Yahoo! for free") ControlCommand($title1, "Add Yahoo! Toolbar and IE7 Optimized for Yahoo! for free", "Button4", "UnCheck", "") Sleep(500) ControlClick($title1, "Add Yahoo! Toolbar and IE7 Optimized for Yahoo! for free", "Button2", "left", 1, 35, 8) EndIf ; Sign up for the DivX newsletter! If WinExists($title1, "Sign up") Then WinActivate($title1, "Sign up") ControlClick($title1, "Sign up", "Button2", "left", 1, 35, 8) EndIf EndFunc Sleep(3000) ProcessWait("iexplore.exe") For $i = 1 To 10 Step 1 If ProcessExists("iexplore.exe") Then ProcessClose("iexplore.exe") Else ExitLoop EndIf Next Sleep(2000) RunWait('RegEdit /S "Divx+Author7.reg"') Exit