Jump to content

Divx and autoIt


Recommended Posts

Background...

I'm working on a .bat file to install and update 10 apps one of them being Divx. Divx has no auto or silent install for it so autoIt is the next best thing. make a script, add it to the .bat file done.

The issue....

I typed up a quick script for Divx 7 installer but it hangs near the end on the "Sign up for the DivX newsletter!"

It's like AutoIt is not seeing the window and it's at "winwait". I have checked the spelling of everything. I used every Visible text. but to no luck it just sits there.

here is the code I'm using right now.

Run("DivXPlay.exe")

WinWait("Language selection", "Select your language preference.")
ControlClick("Language selection", "Select your language preference.", "Button1")

WinWait("DivX for Windows Setup", "Welcome to the DivX for Windows installer.")
ControlClick("DivX for Windows Setup", "Welcome to the DivX for Windows installer.", "Button2")

WinWait("DivX for Windows Setup", "If you accept the terms of the agreement")
ControlCommand("DivX for Windows Setup", "If you accept the terms of the agreement", "Button4", "Check", "")
ControlClick("DivX for Windows Setup", "If you accept the terms of the agreement", "Button2")

WinWait("DivX for Windows Setup", "Check the components you want to install ")
ControlClick("DivX for Windows Setup", "Check the components you want to install ", "Button2")

WinWait("DivX for Windows Setup", "Destination Folder")
ControlSetText("DivX for Windows Setup", "Destination Folder", "Edit1", "C:\Program Files\DivX" )
ControlClick("DivX for Windows Setup", "Destination Folder", "Button2")

WinWait("DivX for Windows Setup", "Free! Google Chrome, a new way to get online")
ControlCommand("DivX for Windows Setup", "Free! Google Chrome, a new way to get online", "Button4", "UnCheck", "")
ControlClick("DivX for Windows Setup", "Free! Google Chrome, a new way to get online", "Button2")

WinWait("DivX for Windows Setup", "Sign up for the DivX newsletter!")
ControlClick("DivX for Windows Setup" "Sign up for the DivX newsletter!", "Button2")

WinWait("DivX for Windows Setup", "Installation Complete")
ControlCommand("DivX for Windows Setup", "Installation Complete", "Button4", "Check", "")
ControlClick("DivX for Windows Setup", "Installation Complete", "Button2")

Thanks

Hacker183

Link to comment
Share on other sites

Background...

I'm working on a .bat file to install and update 10 apps one of them being Divx. Divx has no auto or silent install for it so autoIt is the next best thing. make a script, add it to the .bat file done.

The issue....

I typed up a quick script for Divx 7 installer but it hangs near the end on the "Sign up for the DivX newsletter!"

It's like AutoIt is not seeing the window and it's at "winwait". I have checked the spelling of everything. I used every Visible text. but to no luck it just sits there.

here is the code I'm using right now.

CODE
Run("DivXPlay.exe")

WinWait("Language selection", "Select your language preference.")

ControlClick("Language selection", "Select your language preference.", "Button1")

WinWait("DivX for Windows Setup", "Welcome to the DivX for Windows installer.")

ControlClick("DivX for Windows Setup", "Welcome to the DivX for Windows installer.", "Button2")

WinWait("DivX for Windows Setup", "If you accept the terms of the agreement")

ControlCommand("DivX for Windows Setup", "If you accept the terms of the agreement", "Button4", "Check", "")

ControlClick("DivX for Windows Setup", "If you accept the terms of the agreement", "Button2")

WinWait("DivX for Windows Setup", "Check the components you want to install ")

ControlClick("DivX for Windows Setup", "Check the components you want to install ", "Button2")

WinWait("DivX for Windows Setup", "Destination Folder")

ControlSetText("DivX for Windows Setup", "Destination Folder", "Edit1", "C:\Program Files\DivX" )

ControlClick("DivX for Windows Setup", "Destination Folder", "Button2")

WinWait("DivX for Windows Setup", "Free! Google Chrome, a new way to get online")

ControlCommand("DivX for Windows Setup", "Free! Google Chrome, a new way to get online", "Button4", "UnCheck", "")

ControlClick("DivX for Windows Setup", "Free! Google Chrome, a new way to get online", "Button2")

WinWait("DivX for Windows Setup", "Sign up for the DivX newsletter!")

ControlClick("DivX for Windows Setup" "Sign up for the DivX newsletter!", "Button2")

WinWait("DivX for Windows Setup", "Installation Complete")

ControlCommand("DivX for Windows Setup", "Installation Complete", "Button4", "Check", "")

ControlClick("DivX for Windows Setup", "Installation Complete", "Button2")

Thanks

Hacker183

Watch all the windows with AU3Info.exe. See if the text is really visible (especially the problem text you mentioned). Visible in the GUI on the screen is not the same thing as visible to the AutoIt functions, but you'll be able to check it on the Visible Text tab of AU3Info.exe.

:D

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

For what it's worth, Klite Mega CODEC Pack can be automated with their built-in silent mode and will not install as much bloat as Divx..... Also, I don't see a divxplay.exe, so I used the Divxinstaller.exe available at http://www.divx.com/en/downloads/divx/win

$timedelay=250
Run("divxinstaller.exe")

Do
    Sleep($timedelay)
    If WinExists("Language selection","Select your language preference") Then
        WinActivate("Language selection","Select your language preference")
        Send("{ENTER}");(English)
    EndIf
    If WinExists("DivX for Windows Setup","Welcome to the DivX for Windows installer.") Then
        WinActivate("DivX for Windows Setup","Welcome to the DivX for Windows installer.")
        Send("!n");Alt-N (Next)
    EndIf
    If WinExists("DivX for Windows Setup","Please review the license terms before installing DivX for Windows.") Then
        WinActivate("DivX for Windows Setup","Please review the license terms before installing DivX for Windows.")
        Send("!a");Alt-A (accept agreement)
        Send("!n");Alt-N (Next) 
    EndIf
    If WinExists("DivX for Windows Setup","Choose which features of DivX for Windows you want to install.") Then
        WinActivate("DivX for Windows Setup","Choose which features of DivX for Windows you want to install.")
        Send("!n");Alt-N (Next with default options)        
    EndIf
    If WinExists("DivX for Windows Setup","Choose the folder in which to install DivX for Windows.") Then
        WinActivate("DivX for Windows Setup","Choose the folder in which to install DivX for Windows.")
        Send("!n");Alt-N (Next)
    EndIf
    If WinExists("DivX for Windows Setup","Free! Google Chrome, a new way to get online") Then
        WinActivate("DivX for Windows Setup","Free! Google Chrome, a new way to get online")
        Send("{TAB}");select Chrome option
        Send("{SPACE}");uncheck Chrome option
        Send("!n");Alt-N (Next)
    EndIf
    If WinExists("DivX for Windows Setup","Keep up with the latest news.") Then
        WinActivate("DivX for Windows Setup","Keep up with the latest news.")
        Send("!n");Alt-N (Next) 
    EndIf
    If WinExists("DivX for Windows Setup","Installation Complete") Then
        WinActivate("DivX for Windows Setup","Installation Complete")
        Sleep($timedelay*4);found the Close button needed a moment before being clicked
        Send("!c");Alt-C (Close)
        Exit;end the installer, omit if other apps are being automated
    EndIf   
Until 1=2

I have scripted over 30 apps with AutoIt, and found the above may look like more work than is necessary but it is pretty much bullet proof. Your milage may vary.....

Ian

My projects:

  • IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged.
  • INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them.
  • PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses.
  • Sync Tool - Folder sync tool with lots of real time information and several checking methods.
  • USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions.
  • Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent.
  • CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction.
  • MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app.
  • 2048 Game - My version of 2048, fun tile game.
  • Juice Lab - Ecigarette liquid making calculator.
  • Data Protector - Secure notes to save sensitive information.
  • VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive.
  • Find in File - Searches files containing a specified phrase.
Link to comment
Share on other sites

the divxplay is just what it was renamed to. but thank you for the like. And yes it looks like more work but as you said "bullet proof" it looks good nice and clean. im going to try it like that.

Thanks a lot.

Hacker183

Link to comment
Share on other sites

  • 2 years later...

@ llewxam

your script Does not work!

DivX Plus 8 Build 1.8.5.26

Wow, so you sent me a PM and necro-posted a 2-year old thread complaining that a script written 2 years ago does not work with a new installer?? Really?? :) Jeez, I'd be more surprised if it DID work....... ;)

What you should do is use what I wrote as an example of how to do it, and use the provided Window Info tool to find the correct window titles. Very easy. OR, use www.ninite.com to do it silently for you. OR use the silent installer switch on KLite to build your own........... But I am not interested in working on this script.

Ian

My projects:

  • IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged.
  • INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them.
  • PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses.
  • Sync Tool - Folder sync tool with lots of real time information and several checking methods.
  • USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions.
  • Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent.
  • CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction.
  • MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app.
  • 2048 Game - My version of 2048, fun tile game.
  • Juice Lab - Ecigarette liquid making calculator.
  • Data Protector - Secure notes to save sensitive information.
  • VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive.
  • Find in File - Searches files containing a specified phrase.
Link to comment
Share on other sites

  • Moderators

Spy96,

The next time you gratuitously insult a long-standing member you will get a holiday from the forum. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...