Sign in to follow this  
Followers 0
t0ddie

wait until file exists

5 posts in this topic

while not FileExists(@desktopdir & "\Firefox Setup 1.0.exe")

sleep (1000)

wend

Runwait("Firefox Setup 1.0.exe",@desktopdir,1 )

im trying to create a script that will autoinstall firefox

will this work for running the .exe after it has fully downloaded ?


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

will this work for running the .exe after it has fully downloaded ?

<{POST_SNAPBACK}>

Depends how you do the download. It will only work when the file is created at the end of the download. You might want to test for the filesize as well to ensure the file is available and not being copied.

Runwait will fail because you need to specify the target program including its full path.

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

well, it downloads to the desktop, and i thought i specified the full path.

and it seems that the file appears after the download is completed.

i have seen other files appear first, but they arent .exe until they are finished

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

well, it downloads to the desktop, and i thought i specified the full path.

and it seems that the file appears after the download is completed.

i have seen other files appear first, but they arent .exe until they are finished

<{POST_SNAPBACK}>

nope you specified the working dir... not the startup dir.

Runwait(@desktopdir & "\Firefox Setup 1.0.exe",@desktopdir)


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

it would be better for you in the long run to download it like to temp directory. then move it to the directory that you wish for it to run from. reason being if you download it to temp directory, and then try to use filemove. if it errors out then you can tell it to still wait. reason why i even say this because you never know the following. what is the exact size of the file. example you never know if it was updated since the last time. two the file being downloded you don't know if it is gonna be a generated name or the same name as you downloaded then later changed. you have alot of options.


 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

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