bcharris Posted November 15, 2005 Share Posted November 15, 2005 I've been reading through this forum for ideas on why my script may be pausing. The closest post I've come to so far is: # 121829http://www.autoitscript.com/forum/index.ph...29entry121829The script below installs an application and answers all of the prompts. On some machines, both W2k and XP, the script pauses. I thought initially, that this may be caused due to user intervention or perhaps another application might be running and interrupting the script...When the script pauses, I am not able to "unpause" only "exit".Please advise, thanks!CODE______________________________________________________________Run ("setupex.exe")WinWaitActive ("InstallShield Self-extracting EXE")Send("!y")WinWaitActive ("InstallShield Self-extracting Exe")Send("equinox{ENTER}")WinWaitActive ("Readme Information")Send("!n")WinWaitActive ("Install")Send("{SPACE}")WinWaitActive ("Install")Send("{SPACE}")WinWaitActive ("Choose Destination Location")Send("!n")WinWaitActive ("DlgcacWinName")Send("!n")WinWaitActive ("C:\Documents and Settings\All Users\Start Menu\Programs\Callisto4.3")Send("!{F4}")WinWaitActive ("Setup Complete")Send("{SPACE}")END CODE______________________________________________________________ Link to comment Share on other sites More sharing options...
bcharris Posted November 15, 2005 Author Share Posted November 15, 2005 Additionally, The script pauses at the last prompt. Link to comment Share on other sites More sharing options...
SpookMeister Posted November 15, 2005 Share Posted November 15, 2005 Where is it pausing? It's probably still waiting for a certain window to become active. Check your spelling on the titles and consider adding a timeout to the WinWaitActive lines [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Valuater Posted November 15, 2005 Share Posted November 15, 2005 Where is it pausing? It's probably still waiting for a certain window to become active. Check your spelling on the titles and consider adding a timeout to the WinWaitActive linesand try thisDim $sleeper = 500; change to any sleep time that works Opt("TrayIconDebug", 1);0=no info, 1=debug line info Run ("setupex.exe") Sleep($sleeper) WinWaitActive ("InstallShield Self-extracting EXE") Send("!y") Sleep($sleeper) WinWaitActive ("InstallShield Self-extracting Exe") Send("equinox{ENTER}") Sleep($sleeper) WinWaitActive ("Readme Information") Send("!n") Sleep($sleeper) WinWaitActive ("Install") Send("{SPACE}") Sleep($sleeper) WinWaitActive ("Install") Send("{SPACE}") Sleep($sleeper) WinWaitActive ("Choose Destination Location") Send("!n") Sleep($sleeper) WinWaitActive ("DlgcacWinName") Send("!n") Sleep($sleeper) WinWaitActive ("C:\Documents and Settings\All Users\Start Menu\Programs\Callisto4.3") Send("!{F4}") Sleep($sleeper) WinWaitActive ("Setup Complete") Send("{SPACE}")hope that helps8) Link to comment Share on other sites More sharing options...
bcharris Posted November 16, 2005 Author Share Posted November 16, 2005 Thank you both, SpookMeister & Valuater,You were right, issue was with waiting for a window to become active, at the following line:WinWaitActive ("C:\Documents and Settings\All Users\Start Menu\Programs\Callisto4.3")Send("!{F4}")Reason: This window (normally) opens when the application short-cuts are copied to the PC. On some PCs this window does not open, the short-cuts are created in the background.Q: Would it be best to place a condition looking for the the window...or is there a better way to address? Link to comment Share on other sites More sharing options...
Valuater Posted November 16, 2005 Share Posted November 16, 2005 try this While 1 If WinActive("this title") = 1 then exitloop If WinActive("that title") = 1 then ; do this EndIf WEnd 8) Link to comment Share on other sites More sharing options...
MHz Posted November 16, 2005 Share Posted November 16, 2005 (edited) Perhaps Adlib maybe more suitable. This is what I would try. Run ("setupex.exe") WinWaitActive ("InstallShield Self-extracting EXE") Send("!y") WinWaitActive ("InstallShield Self-extracting Exe") Send("equinox{ENTER}") WinWaitActive ("Readme Information") Send("!n") WinWaitActive ("Install") Send("{SPACE}") WinWaitActive ("Install") Send("{SPACE}") WinWaitActive ("Choose Destination Location") Send("!n") WinWaitActive ("DlgcacWinName") Send("!n") AdlibEnable('_Adlib') WinWaitActive ("Setup Complete") Send("{SPACE}") AdlibDisable() Func _Adlib() If WinActive("C:\Documents and Settings\All Users\Start Menu\Programs\Callisto4.3") Then Send("!{F4}") EndIf EndFunc Edit: Using Opt(WindowTitleMatchMode, 2) may make the explorer window title a little better with a substring required only. Edited November 16, 2005 by MHz Link to comment Share on other sites More sharing options...
Valuater Posted November 16, 2005 Share Posted November 16, 2005 (edited) @MHz do you need to AdlibDisable() after the result is true??? i thought this would continue the function until disabled ??? 8) Edited November 16, 2005 by Valuater Link to comment Share on other sites More sharing options...
MHz Posted November 16, 2005 Share Posted November 16, 2005 It just closes the script neatly. The AdlibEnable runs until AdlibDisable is called or the script finishes. You could probably leave out AdlibDisable() as it is running it until the end...but covering all the bases makes for a happy script. Link to comment Share on other sites More sharing options...
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