Sign in to follow this  
Followers 0
SpecialK

How to make the script wait for finishing "FileInstall"?

5 posts in this topic

Hello,

i hope this is not a too stupid question.

I habe included a 400 MB Office Image with "FileInstall".

When i'm testing the script nothinig happens after the "FileInstall" syntax.

But when i set a Sleep(12000) after the FileInstall it works fine.

So i think the FileInstall took to much time and the script doesn't wait till the hole file is copied in the destination folder.

But i don't want to use the Sleep syntax, because every PC needs a different time. So im looking for a solution that the script continious when the FileInstall ist finished.

SpecialK

Share this post


Link to post
Share on other sites



Welcome to the forums!

FileInstall and FileCopy don't return execution to the script until they finish. I've used them with large files as well, and never had any issues.

It would be best if you posted your script. Most likely the issue is caused by something else in the code unrelated to FileInstall.


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hello,

this is the part of the code with the Problem:

DirCreate ("c:\temp\Office2003")
FileInstall ("c:\AutoIt\old\Office2003.exe", "c:\temp\Office2003\Office2003.exe", 1)
MsgBox(0, "Bitte warten...", "Benötigte Dateien werden kopiert.")
run ("c:\temp\Office2003\Office2003.exe")
WinWaitActive ("Selbstentpackendes WinRAR-Archiv", "&Zielverzeichnis")
ControlSend ("Selbstentpackendes WinRAR-Archiv", "&Zielverzeichnis" , 1001 , "^ac:\temp\Office2003")

SpecialK

Edited by SpecialK

Share this post


Link to post
Share on other sites

Don't ask why but now everything works fine.

Only the MsgBox was a bad idea. Is it possible to display an info windows which automaticly closes itself when the script is finished?

Share this post


Link to post
Share on other sites

There are many ways to display info in a window.

Take a look at ProgressOn, SplashTextOn, and GuiCreate.


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

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