Jump to content

Help with software install - simple for experts


Recommended Posts

Newbie here.

Went through the help file and the examples and found my commands to build a script to install software.

My script is working halfway through, and then quitting on me. I'm trying to get an Alt + N command (or Enter should work) to move to the next step of the install, but the script stops. Below is the script and further down is the AutoIt window info. Any help would be appreciated. Thanks.

I run an executable, and the following commands:

; SELECTS THE BROWSE BUTTON

WinWaitActive("Choose Destination Location", "B&rowse...")

Send("!r")

; SELECTS INSTALL DIRECTORY

WinWaitActive("Select Destination Directory", Send("D:\Claimchk\V60\Bin"), Send("{ENTER}"))

WinWaitActive("Install", Send("{ENTER}"))

WinWaitActive("Select Destination Directory", Send("{ENTER}"))

---------------------------------

SCRIPT WORKS UP TO HERE

---------------------------------

;PROBLEMATIC - SHOULD SEND ENTER OR ALT+N COMMAND.

WinWaitActive("", "&Next >", Send("!n"))

The line above is where it quits. I've tried using a capital N in the Send command and various different lines using the Enter command and even going as far as changing focus back to the window. Nothing has worked. I have delved through the help file and I'm only stopped short when I get to the CONTROL functions

:)

Here is the AutoIt Window text:

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

Title: Choose Destination Location

Class: GLBSWizard

Size: X: 270 Y: 182 W: 483 H: 357

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

Screen: X: 616 Y: 517

Cursor ID: 2

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

RGB: Hex: 0xD4D0C8 Dec: 13947080

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

Size: X: 301 Y: 301 W: 73 H: 23

Control ID: 3

ClassNameNN: Button1

Text: &Next >

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

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

&Next >

< &Back

Cancel

Setup will install QNXT ClaimCheck Com+ Component Installation in the following folder.

To install into a different folder, click Browse, and select another folder.

You can choose not to install QNXT ClaimCheck Com+ Component Installation by clicking Cancel to exit Setup.

Destination Folder

B&rowse...

D:\Claimchk\V60\Bin

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

Edited by fozzi58
Link to comment
Share on other sites

WinWaitActive("", "&Next >", Send("!n"))

there's your problem... you have your script waiting for a window with an empty string for the title with an autoit function as the timeout and the control text as text to find in the window, none of those criteria will be met, and i'm surprised an error wasn't generated when you try to run the script...

from the helpfile: WinWaitActive ( "title", ["text"], [timeout] )

you may want to check out the control click to click the next button,

ControlClick ( "title", "text", controlID [, button] [, clicks]] )

that's not the only way to get it to do what you want, but whatever way you go with, the line quoted above needs to be deleted, or greatly modified

Link to comment
Share on other sites

  • Developers

don't put the send() command inside the WinWaitActive()

Use:

; SELECTS THE BROWSE BUTTON
WinWaitActive("Choose Destination Location", "B&rowse...")
Send("!r")
; SELECTS INSTALL DIRECTORY
WinWaitActive("Select Destination Directory", "")
Send("D:\Claimchk\V60\Bin")
Send("{ENTER}")
WinWaitActive("Install", "")
Send("{ENTER}")
WinWaitActive("Select Destination Directory", "")
Send("{ENTER}")
---------------------------------
SCRIPT WORKS UP TO HERE
---------------------------------
;PROBLEMATIC - SHOULD SEND ENTER OR ALT+N COMMAND.
WinWaitActive("", "&Next >", "")
Send("!n")

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

there's your problem... you have your script waiting for a window with an empty string for the title with an autoit function as the timeout and the control text as text to find in the window, none of those criteria will be met, and i'm surprised an error wasn't generated when you try to run the script...

from the helpfile: WinWaitActive ( "title", ["text"], [timeout] )

you may want to check out the control click to click the next button,

ControlClick ( "title", "text", controlID [, button] [, clicks]] )

I've written the script that way as well. I took a line right from the WinZip example and mimicked it, and it still didn't work. The new line would look like this:

WinWaitActive("Choose Destination Location", "&Next >", )

Send("!N")

It still doesn't work. I have also tried:

ControlCommand("Select Destination Directory", "", 3)

Send("{ENTER}")

The results are the same. I completely understand the concepts and I am able to get the script working up to a certain point. My frustration is coming with why the script is not passing the Alt+N (or even a simple Enter command) on the next step, especially when I was successful with passing an Alt+R command to get to the Browse button. More guidance please.

JdbE - took the Send commands out of the WinWaitActive line - same results.

Edited by fozzi58
Link to comment
Share on other sites

  • Developers

what about ?:

WinWaitActive("Choose Destination Location", "")
ControlClick ( "Choose Destination Location", "", Button1)
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

what about ?:

WinWaitActive("Choose Destination Location", "")
ControlClick ( "Choose Destination Location", "", Button1)

<{POST_SNAPBACK}>

Changed:

WinWaitActive("Choose Destination Location", "&Next >", Send("!N"))

to

WinWaitActive("Choose Destination Location", "&Next >", )

Send("!N")

Link to comment
Share on other sites

  • Developers

Changed:

WinWaitActive("Choose Destination Location", "&Next >", Send("!N"))

to

WinWaitActive("Choose Destination Location", "&Next >", )

Send("!N")

<{POST_SNAPBACK}>

What do you mean ?

I think you already told us that this didn't work ... right ?

So what about using the 2 lines in my previous post in stead of your 2 lines ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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