Help! I am trying to write an Autoit script to automate this programs install. It seems to install just fine, but then program throws up a nag screen. Since I have purchased a license that's no problem I tried extending the script to handle the nag screen with the proper info. But the script stalls/pauses and I haven't been able to figure out why.
Can someone take a look at my script and figure out why? Any help would be much appreciated
Thanks
Quote
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.1.1.0
Program: PowerArchiver 2006 9.63
Author: Dropcheck
Date: Nov 23, 2006
Script Function: Install PowerArchiver 2006 9.63 and enter registration info
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#region User Info.
$RegName = 'Your Name'
$RegKey = 'xxxx-xxxx-xxxx'
#endregion
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
Run('powarc963.exe')
;Welcome message
WinWaitActive("Setup - PowerArchiver","Welcome to the PowerArchiver Setup Wizard")
; Next
ControlClick("Setup - PowerArchiver","","TButton1")
;Destination in ProgramFiles
WinWaitActive("Setup - PowerArchiver","Select Destination Location")
; Next
ControlClick("Setup - PowerArchiver","","TButton3")
;Start menu folder - leave for default right now
WinWaitActive("Setup - PowerArchiver","Select Start Menu Folder")
; Next
ControlClick("Setup - PowerArchiver","","TButton4")
;Additional install options
WinWaitActive("Setup - PowerArchiver","Additional Install Options")
ControlClick("Setup - PowerArchiver","","TButton4")
;Ready to install
WinWaitActive("Setup - PowerArchiver","Ready to Install")
ControlClick("Setup - PowerArchiver","","TButton4")
;Completing setup wizard
WinWaitActive("Setup - PowerArchiver","Completing the PowerArchiver Setup Wizard")
Send("{TAB 4} "&" {SPACE}")
ControlClick("Setup - PowerArchiver","","TButton4")
;Now we have finished installing and the original setup window closes
;and the program configuration begins
;ie now it wants us to buy/register the program
;First we can see the unregistered program window opens up then the register window
;opens on top of it. But the register window is not the active window.
;This is where it stalls/pauses
WinWait("PowerArchiver 2006","Enter &Registration ")
If Not WinActive("PowerArchiver 2006","Enter &Registration ") Then WinActivate("PowerArchiver 2006","Enter &Registration ")
WinWaitActive("PowerArchiver 2006","Enter &Registration ")
MouseClick("PowerArchiver 2006","Enter &Registration ","TButton3")
;Here's where we can put in the registration info
WinWait("Register PowerArchiver","&Ordering Informatio")
If Not WinActive("Register PowerArchiver","&Ordering Informatio") Then WinActivate("Register PowerArchiver","&Ordering Informatio")
WinWaitActive("Register PowerArchiver","&Ordering Informatio")
Send($RegName)
Send("{TAB}")
Send($RegKey)
ControlClick("Register PowerArchiver","&Ordering Information","TButton4")
;Stupid window pops telling me I have to restart program
WinWait("PowerArchiver","OK")
If Not WinActive("PowerArchiver","OK") Then WinActivate("PowerArchiver","OK")
WinWaitActive("PowerArchiver","OK")
Send("{ENTER}")
;I don't need no stinking tip of the day
WinWait("PowerArchiver Tip of the Day","&Next Tip")
If Not WinActive("PowerArchiver Tip of the Day","&Next Tip") Then WinActivate("PowerArchiver Tip of the Day","&Next Tip")
WinWaitActive("PowerArchiver Tip of the Day","&Next Tip")
;Okay finally we are ready to finish the install
ProcessClose("POWERARC.EXE")
Exit
AutoIt Version: 3.1.1.0
Program: PowerArchiver 2006 9.63
Author: Dropcheck
Date: Nov 23, 2006
Script Function: Install PowerArchiver 2006 9.63 and enter registration info
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#region User Info.
$RegName = 'Your Name'
$RegKey = 'xxxx-xxxx-xxxx'
#endregion
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
Run('powarc963.exe')
;Welcome message
WinWaitActive("Setup - PowerArchiver","Welcome to the PowerArchiver Setup Wizard")
; Next
ControlClick("Setup - PowerArchiver","","TButton1")
;Destination in ProgramFiles
WinWaitActive("Setup - PowerArchiver","Select Destination Location")
; Next
ControlClick("Setup - PowerArchiver","","TButton3")
;Start menu folder - leave for default right now
WinWaitActive("Setup - PowerArchiver","Select Start Menu Folder")
; Next
ControlClick("Setup - PowerArchiver","","TButton4")
;Additional install options
WinWaitActive("Setup - PowerArchiver","Additional Install Options")
ControlClick("Setup - PowerArchiver","","TButton4")
;Ready to install
WinWaitActive("Setup - PowerArchiver","Ready to Install")
ControlClick("Setup - PowerArchiver","","TButton4")
;Completing setup wizard
WinWaitActive("Setup - PowerArchiver","Completing the PowerArchiver Setup Wizard")
Send("{TAB 4} "&" {SPACE}")
ControlClick("Setup - PowerArchiver","","TButton4")
;Now we have finished installing and the original setup window closes
;and the program configuration begins
;ie now it wants us to buy/register the program
;First we can see the unregistered program window opens up then the register window
;opens on top of it. But the register window is not the active window.
;This is where it stalls/pauses
WinWait("PowerArchiver 2006","Enter &Registration ")
If Not WinActive("PowerArchiver 2006","Enter &Registration ") Then WinActivate("PowerArchiver 2006","Enter &Registration ")
WinWaitActive("PowerArchiver 2006","Enter &Registration ")
MouseClick("PowerArchiver 2006","Enter &Registration ","TButton3")
;Here's where we can put in the registration info
WinWait("Register PowerArchiver","&Ordering Informatio")
If Not WinActive("Register PowerArchiver","&Ordering Informatio") Then WinActivate("Register PowerArchiver","&Ordering Informatio")
WinWaitActive("Register PowerArchiver","&Ordering Informatio")
Send($RegName)
Send("{TAB}")
Send($RegKey)
ControlClick("Register PowerArchiver","&Ordering Information","TButton4")
;Stupid window pops telling me I have to restart program
WinWait("PowerArchiver","OK")
If Not WinActive("PowerArchiver","OK") Then WinActivate("PowerArchiver","OK")
WinWaitActive("PowerArchiver","OK")
Send("{ENTER}")
;I don't need no stinking tip of the day
WinWait("PowerArchiver Tip of the Day","&Next Tip")
If Not WinActive("PowerArchiver Tip of the Day","&Next Tip") Then WinActivate("PowerArchiver Tip of the Day","&Next Tip")
WinWaitActive("PowerArchiver Tip of the Day","&Next Tip")
;Okay finally we are ready to finish the install
ProcessClose("POWERARC.EXE")
Exit



Help
Back to top









