shornw Posted July 4, 2006 Posted July 4, 2006 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]
BigDod Posted July 4, 2006 Posted July 4, 2006 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
shornw Posted July 4, 2006 Author Posted July 4, 2006 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]
Briegel Posted July 4, 2006 Posted July 4, 2006 Do the window works with ... ... WinExists () ... WinList () ... WinWaitActive () ?
herewasplato Posted July 4, 2006 Posted July 4, 2006 (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 July 4, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
shornw Posted July 4, 2006 Author Posted July 4, 2006 (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 July 4, 2006 by shornw [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]
herewasplato Posted July 4, 2006 Posted July 4, 2006 ..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]
Briegel Posted July 4, 2006 Posted July 4, 2006 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)?
shornw Posted July 5, 2006 Author Posted July 5, 2006 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 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 agreementI &accept the terms in the license agreement&Next >CancelPlease read the following license agreement carefully.License AgreementNewBinary1InstallShieldInstallShieldI 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 logicalAm 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]
Briegel Posted July 5, 2006 Posted July 5, 2006 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': expandcollapse popupPress 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!
MHz Posted July 5, 2006 Posted July 5, 2006 There is an easier method such as silent install RunWait(@ScriptDir & '\setup.exe /s /v"/qn JAVAUPDATE=0"')
shornw Posted July 5, 2006 Author Posted July 5, 2006 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]
MHz Posted July 5, 2006 Posted July 5, 2006 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now