Jump to content
Sign in to follow this  
Guest freq47

windows that are not always neccesrary

Recommended Posts

Guest freq47

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_

Share this post


Link to post
Share on other sites
JSThePatriot

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: grammar

JS

Edited 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)

Share this post


Link to post
Share on other sites
seandisanti

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.

Share this post


Link to post
Share on other sites
herewasplato

Let us assume that you have:

window#1

window#2

window#2a <<< might not happen

window#3

window#4

done

You could try this pseudo code behind door #1:

WinWait (window#1)

Send whatever

WinWait (window#2)

Send whatever

While 1

If WinExists (window#2a) Then Send whatever

If WinExists (window#3) Then

Send whatever

ExitLoop

Sleep(100)

WEnd

WinWait (window#4)

Send whatever

done

Or try the pseudo code behind door #2:

AdlibEnable(might_happen)

WinWait (window#1)

Send whatever

WinWait (window#2)

Send whatever

WinWait (window#3)

Send whatever

WinWait (window#4)

Send whatever

done

Func (might_happen)

If WinExists (window#2a) Then Send whatever

EndFunc

You 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 whatever

WinWait (window#2)

Send whatever

AdlibEnable(might_happen)

WinWait (window#3)

Send whatever

AdlibDisable(might_happen)

WinWait (window#4)

Send whatever

done

Func (might_happen)

If WinExists (window#2a) Then Send whatever

EndFunc

...or just take the cash from Monty...

http://math.cofc.edu/faculty/kasman/MATHFI...html?pg=explain

Edit:

@ Valik,

Bus bait? http://www.autoitscript.com/forum/index.ph...=0entry106650

...I could not resist... :-)

Edited by herewasplato

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

Share this post


Link to post
Share on other sites
Guest freq47

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_

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  

×