bored4 Posted April 10, 2008 Share Posted April 10, 2008 I'm trying to make a script to install O&O defrag 10 and register it. heres what i got so far. it installs fine but i get errors when i get to the point of trying to run oo defrag to enter the registration information. Can anyone help me with this or tell me what im trying to do cant be done or something. thanks expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.10.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here run("OODefrag10.exe") WinWaitActive("O&O Defrag Professional Edition - InstallShield Wizard", "The InstallShield(R) Wizard w") Send("!n") WinWaitActive("O&O Defrag Professional Edition - InstallShield Wizard", "License Agreement") Send("!a") Send("!n") WinWaitActive("O&O Defrag Professional Edition - InstallShield Wizard", "Destination Folder") Send("!n") WinWaitActive("O&O Defrag Professional Edition - InstallShield Wizard", "Access") send("!n") WinWaitActive("O&O Defrag Professional Edition - InstallShield Wizard", "Ready to Install the Program") Send("!i") WinWaitActive("O&O Defrag Professional Edition - InstallShield Wizard", "InstallShield Wizard completed") send("!f") ;wait for install window to close WinWaitNotActive("O&O Defrag Professional Edition - InstallShield Wizard", "InstallShield Wizard completed", 5) ;run OO defrag to enter registration information Run("oodcnt.exe" [, "C:\Programfiles\OO Software\Defrag Professional\"]) WinWaitActive("O&O Registration Wizard", "You have 30 days of the trial period remaining.") MouseClick("left" [, 590, 499 [, 1 ]]) ;enter in user name send("*******") MouseClick("left" [, 342, 304 [, 1]]) ;enter company name send("*******") MouseClick("left" [, 352, 332 [, 1]]) ;enter serial key send("****-****-****-****-****") send("!n") WinWaitActive("O&O Registration Wizard", "We have recognized the following product license:") send("!n") WinWaitActive("O&O Registration Wizard", "Thank you for choosing O&O Software!") Send("{ENTER}") WinWaitActive("O&O OneButtonDefrag", "You can enable the defragmentation") MouseClick("left" [, 638, 508 [, 1 ]]) WinWaitActive("O&O Defrag Tip of the Day") send("{ENTER}") WinClose("O&O Defrag 10 Professional Edition") Link to comment Share on other sites More sharing options...
Squirrely1 Posted April 10, 2008 Share Posted April 10, 2008 (edited) More precisely now, just which specific lines or line numbers are throwing the errors? Edited April 10, 2008 by Squirrely1 Das Häschen benutzt Radar Link to comment Share on other sites More sharing options...
bored4 Posted April 10, 2008 Author Share Posted April 10, 2008 (edited) This is the line that give me the error. this is after the program installs and im trying to run the program. if you run oo defrag it pops up and asks you to register. but i cant get to that because this line fail to run the program. Run("oodcnt.exe" [, "C:\Programfiles\OO Software\Defrag Professional\"]) unlike most app that have you enter serial information in during install, OO defrag doesnt ask for that until after you install and then run the program and im trying to create the script that will do that all in one. Edited April 10, 2008 by bored4 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 10, 2008 Moderators Share Posted April 10, 2008 This is the line that give me the error. this is after the program installs and im trying to run the program. if you run oo defrag it pops up and asks you to register. but i cant get to that because this line fail to run the program. Run("oodcnt.exe" [, "C:\Programfiles\OO Software\Defrag Professional\"]) unlike most app that have you enter serial information in during install, OO defrag doesnt ask for that until after you install and then run the program and im trying to create the script that will do that all in one.Whenever you see brackets in the parameters of functions in the help file, that simply means that those parameters are "optional" (unless used in an array). They (the literal brackets) are not meant to be included in the script. Example: MouseClick("left", [[0,] 1]) Should be: MouseClick("left", 0, 1) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
bored4 Posted April 11, 2008 Author Share Posted April 11, 2008 Awsome thanks. i had some more trouble besides that but i managed to get them worked out. thanks again Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now