Sign in to follow this  
Followers 0
Keerwen

Auto Install of software

2 posts in this topic

Hey all, Pretty new to Autoit and posted a while back on an issue i was having with some software installs. Got some help but it didn't fix it. That project is on hold for automation and will just be doing it manually. I have another issue tho. I have a script that works all the way up to the end. It stops responding and i have to manually press enter and uncheck the only box. The script is posted below.

Run ("setup.exe")

WinWaitActive ("Welcome")

Send ("{Enter}")

WinWaitActive("Software License Agreement")

send ("{Enter}")

WinWaitActive("Registration Number")

send("62993")

Send("{Enter}")

WinWaitActive("Choose Destination Location")

send ("&r")

WinWaitActive("Choose Folder")

Send ("C:\Program Files\McTrans\2000e")

Send("{Enter}")

Send("{Enter}")

WinWaitActive("Select Program Folder")

Send ("{Enter}")

WinWaitActive("User Information","Name")

Send("{Enter}")

Send("{enter}")

Send("{enter}")

send ("C:\My Documents\2000e")

send ("{Enter}")

WinWaitActive("Question")

Send("{Enter}")

WinWaitActive("Setup Complete", "Yes, I want to view the Read Me file now.")

;send("{tab}")

;ControlFocus ("Setup Complete", "Setup has finished installing HCS2000 on your computer.", 501)

;ControlClick ("Setup Complete", "", 1)

send ("{@1}")

;send("{Enter}")

Here is the autoit window info

>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Setup Complete

Class: #32770

Size: X: 160 Y: 121 W: 479 H: 357

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 345 Y: 124

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0x4A65A5 Dec: 4875685

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size:

Control ID:

ClassNameNN:

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

Yes, I want to view the Read Me file now.

< &Back

Finish

Setup has finished installing HCS2000 on your computer.

Setup can launch the Read Me file. Choose the option you want below.

Click Finish to complete Setup.

CutWinName

@10551

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Yes, I want to launch HCS2000 now.

@10550,10551;1;1;0,128,128;0,128,128

if i highlight over the check box i want unchecked it shows it as controlid 501 button1 and the finish button comes up as controlid 1 button4. I've tried the controlfocus and controlclick, as well as just the enter command and now even mouseclick. It looks like i'm getting stuck on the window that it's looking for. ANy help would be great then i can setup the rest of the script to install the patches for the program.

Share this post


Link to post
Share on other sites



Try using Opt('TrayIconDebug', 1) at the top of your script. When your script stops, then move your mouse over the systray icon to see the current line that it is paused on. That line will need editing.

This is how you would click the finish button using WinWait() and ControlClick(). I have used the text of the control for the ControlID, but I would normally use the ClassnameNN the AutoIt Info Tool supplies. You do have to have the mouse over the control of interest to get the required information.

WinWait("Setup Complete", 'Setup has finished installing HCS2000')
ControlClick ("Setup Complete", "Setup has finished installing HCS2000", 'Finish')

Using WinWait() and Control*() functions will make your script so more reliable if used as the default method.

Have a look at ControlCommand() for automating Checkboxes.

:whistle:

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  
Followers 0