Sign in to follow this  
Followers 0
shornw

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

13 posts in this topic

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]

Share this post


Link to post
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)


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

Do the window works with ...

... WinExists ()

... WinList ()

... WinWaitActive () ?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites

..Any ideas anybody??????...

manually get to the window of interest then run this one line script:
MsgBox(0,"",WinWait("J2SE","",3))
you should know something in 3 seconds :-)

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

Share this post


Link to post
Share on other sites

There's no spott shornw I know what distress is (if nothing will do so as I want).

Can you post a copy of 'AutoIt Window Info' tagging your window (J2SE)?

Share this post


Link to post
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]

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

There is an easier method such as silent install

RunWait(@ScriptDir & '\setup.exe /s /v"/qn JAVAUPDATE=0"')

:D

Share this post


Link to post
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]

Share this post


Link to post
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

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