Jump to content

First time user looking for some help


Recommended Posts

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")
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Moderators

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

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...