Jump to content
Sign in to follow this  
bored4

First time user looking for some help

Recommended Posts

bored4

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

#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")

Share this post


Link to post
Share on other sites
Squirrely1

More precisely now, just which specific lines or line numbers are throwing the errors?

Edited by Squirrely1

Das Häschen benutzt Radar

Share this post


Link to post
Share on other sites
bored4

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 by bored4

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
bored4

Awsome thanks. i had some more trouble besides that but i managed to get them worked out. thanks again

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.