Jump to content

wait until file exists


t0ddie
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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

Edited by t0ddie

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

Link to comment
Share on other sites

  • Developers

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)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...