Jump to content

WinWait....and Wait....and Wait


Recommended Posts

Hi all

I am automating a software install and this requires using WinWait, however when the window appears the script does nothing. I have entered the Window Title manually, I have also used AutoIt Reveal Mode but nothing.

If I run a second instance of the script without exiting the first then the first script identifies the window and carries on.

I wrote a script that simply comprised:

WinWait("J2SE", 30)

MsgBox(4096, "Test", "Window Identified")

then ran the installer manually, and bingo it worked but if I kick the installer off from within the script it just hangs...it didnt even time out.

Are there any issues with WinWait in V3...I used it extensively in V2 and it was fine.

So....any ideas gratefully received

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Link to comment
Share on other sites

Hi all

I am automating a software install and this requires using WinWait, however when the window appears the script does nothing. I have entered the Window Title manually, I have also used AutoIt Reveal Mode but nothing.

If I run a second instance of the script without exiting the first then the first script identifies the window and carries on.

I wrote a script that simply comprised:

WinWait("J2SE", 30)

MsgBox(4096, "Test", "Window Identified")

then ran the installer manually, and bingo it worked but if I kick the installer off from within the script it just hangs...it didnt even time out.

Are there any issues with WinWait in V3...I used it extensively in V2 and it was fine.

So....any ideas gratefully received

Wrong syntax

WinWait(""J2SE","",30)


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Fair Point BigDod, however it doesnt make any difference, also it wouldnt account for the two scripts running thing.

I have tried all variants of the command but still no luck....Thanks anyway

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Link to comment
Share on other sites

Copy/paste/post your all of your code - or at least the portion giving you trouble.

Eidt:

There was a typo in the code that BigDod suggested - so try this"

WinWait("J2SE","",30)
Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Well spotted Briegel...for some reason NONE of them work. I have tried restarting, uninstalling/reinstalling but still no joy

Any ideas anybody?????? This is really gonna cause me hassle if I can tget it working again

Oddly enough if I try:

Run("Notepad")

WinWait("Untit")

WinSetTitle("Untitled", "", "New Window Name")

Send("how is it that this works")

it works fine...It also works if I open Word, rename the window....How Bizzare

Any ideas guys...Please

Edited by shornw

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Link to comment
Share on other sites

Hi Guys....

Herewasplato I tried your line in the script....at the point when the window opened it all just sat there quietly doing nothing at all. The the script paused, after unpausing it still did nothing then paused again :D

Briegel

>>>> Window Title <<<<

J2SE Runtime Environment 5.0 Update 5 - License

>>>> Window Dimensions <<<<

X: 324 Y: 228 Width: 504 Height: 380

>>>> Mouse Co-ords (relative to active window) <<<<

X: -185 Y: -52

>>>> Window Text <<<<

I &do not accept the terms in the license agreement

I &accept the terms in the license agreement

&Next >

Cancel

Please read the following license agreement carefully.

License Agreement

NewBinary1

InstallShield

InstallShield

I have tried all permutations of Window Title, Window Text etc.

I cant work out why if a script is running in the background it will detect the window. As a workaround I can use two scripts I suppose, but this is messy and not logical

Am I missing something really obvious.

Addition: I just wrote the same script in AutoIt V2 and it works perfectly every time...Gonna try Beta now!!!

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Link to comment
Share on other sites

At my system it works fine (german version and only Update 2):

Run("U:\_Archiv_\DownLoads\Java\jre-1_5_0_02-windows-i586-p.exe")
WinWait("J2SE", "",30)
MsgBox(4096, "Test", "Window Identified")

'AutoIt Window Info':

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<
Title:  J2SE Runtime Environment 5.0 Update 2 - Lizenz
Class:  MsiDialogCloseClass
Size:   X: 326  Y: 243  W: 504  H: 379

>>>>>>>>>>> Mouse Details <<<<<<<<<<<
Screen: X: 716  Y: 254
Cursor ID:  2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<
RGB:    Hex: 0x87A9D5   Dec: 8890837

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<
Size:
Control ID:
ClassNameNN:
Text:

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


>>>>>>>>>>> Visible Window Text <<<<<<<<<<<
Ich &lehne die Bedingungen der Lizenzvereinbarung ab
Ich &akzeptiere die Bedingungen der Lizenzvereinbarung
&Weiter >
Abbrechen
Bitte lesen Sie nachfolgende Lizenzvereinbarung sorgfältig durch.
Lizenzvereinbarung
NewBinary1
InstallShield
InstallShield
Sun Microsystems, Inc.
Binärcode-Lizenzvertrag

für die

JAVA 2 PLATFORM STANDARD EDITION RUNTIME ENVIRONMENT 5.0
;;;;cut here;;;;
>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Something must be wrong with your system or installpackage!

Link to comment
Share on other sites

Thx MHz...I will try this. As a matter of interest where does the /switch info come from, are they relative only to AutoIt or the Windows Installer i.e. can I use the same switches with other installs?

I'm keen to learn this sort of stuff so any chance of explaing the switches or even better point me at somewhere I can find out.

Sorry if I'm being a pain and thanks again

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Link to comment
Share on other sites

Depends on the type of installer used to what switches are available. You could use a application I made here that reports the installer used and what switches are available to use.

The java runtime installer uses Installshield. It is packaged to extract and execute an msi file. The /S is to silence the extract, the /V is to pass following string to the msi that is executed. The /QN makes the msi silent, and the JAVAUPDATE=0 is a msi property used for that installer only to switch off the java update feature.

:D

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