Guest freq47 Posted September 6, 2005 Share Posted September 6, 2005 First of all thanks for your great program. I need to automate a software install, the only problem is that if there has been a install already, and its just upgrading I will get a prompt about overwriting the file. I can do a wait time out but, solower machines or more loaded machines could take longer. Is this the only way to do this, Thankyou _Freq47_ Link to comment Share on other sites More sharing options...
JSThePatriot Posted September 6, 2005 Share Posted September 6, 2005 (edited) First of all thanks for your great program.I need to automate a software install, the only problem is that if there has been a install already, and its just upgrading I will get a prompt about overwriting the file. I can do a wait time out but, solower machines or more loaded machines could take longer. Is this the only way to do this,Thankyou_Freq47_<{POST_SNAPBACK}>Check out the WinWait() function and Win*() functions.Edit: grammarJS Edited September 6, 2005 by JSThePatriot AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
seandisanti Posted September 6, 2005 Share Posted September 6, 2005 First of all thanks for your great program.I need to automate a software install, the only problem is that if there has been a install already, and its just upgrading I will get a prompt about overwriting the file. I can do a wait time out but, solower machines or more loaded machines could take longer. Is this the only way to do this,Thankyou_Freq47_<{POST_SNAPBACK}>prob the best thing to do is use WinWait()'s to wait for each window before continuing, and have an Adlib running that checks WinExists() for the overwrite window to appear. or you can have a loop between the two windows where that window could appear that checks for either of the 2 next windows (overwrite or success) and reacts accordingly. the latter is the method i usually prefer since it doesn't check for the window's presence before it could appear, or after, and i think that makes it more efficient, but every time i write out an example illustrating that (there have been several if you check the forums) other people say that the adlib route is the way to go. Link to comment Share on other sites More sharing options...
herewasplato Posted September 7, 2005 Share Posted September 7, 2005 (edited) Let us assume that you have:window#1window#2window#2a <<< might not happenwindow#3window#4doneYou could try this pseudo code behind door #1:WinWait (window#1)Send whateverWinWait (window#2)Send whateverWhile 1If WinExists (window#2a) Then Send whateverIf WinExists (window#3) ThenSend whateverExitLoopSleep(100)WEndWinWait (window#4)Send whateverdoneOr try the pseudo code behind door #2:AdlibEnable(might_happen)WinWait (window#1)Send whateverWinWait (window#2)Send whateverWinWait (window#3)Send whateverWinWait (window#4)Send whateverdoneFunc (might_happen)If WinExists (window#2a) Then Send whateverEndFuncYou might not want to keep checking for window#2a in places that it cannot exist like the pseudo code behind door #2 does... in that case, try the pseudo code behind door #3:WinWait (window#1)Send whateverWinWait (window#2)Send whateverAdlibEnable(might_happen)WinWait (window#3)Send whateverAdlibDisable(might_happen)WinWait (window#4)Send whateverdoneFunc (might_happen)If WinExists (window#2a) Then Send whateverEndFunc...or just take the cash from Monty...http://math.cofc.edu/faculty/kasman/MATHFI...html?pg=explainEdit:@ Valik,Bus bait? http://www.autoitscript.com/forum/index.ph...=0entry106650...I could not resist... :-) Edited September 7, 2005 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Guest freq47 Posted September 7, 2005 Share Posted September 7, 2005 Thanks, sorry, I am just in a hurry and haven't had time to scan all the docs, I promise I will if I have to ask another question. I skipped over the adlibenable function totally probably because of its name. Anyhow thanks, your help has been greatly appreciated. _Freq47_ 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