drw112 Posted April 10, 2008 Posted April 10, 2008 The script "runs" fine but when I try to compile it I get the error Invalid FileInstall() Function: ;File install for images Global $images[7] = ["\vlc.jpg", "\sb.gif", "\reader.jpg", "\jre.jpg", "\winzip.jpg", "\smail.jpg", "printer.jpg"] $i = 0 While $i < UBound($images) FileInstall("C:\AutoIT\images\" & $images[$i], @TempDir & $images[$i]) $i = $i + 1 Wend Anybody have an idea?
Developers Jos Posted April 10, 2008 Developers Posted April 10, 2008 FileInstall ( "source", "dest" [, flag] ) Parameters source The source path of the file to compile. This must be a literal string; it cannot be a variable. dest The destination path of the file with trailing backslash if only the directory is used. This can be a variable. flag [optional] this flag determines whether to overwrite files if they already exist: 0 = (default) do not overwrite existing files 1 = overwrite existing files 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.
drw112 Posted April 10, 2008 Author Posted April 10, 2008 This seems pretty inefficient for people that have a lot of files to install. There is absolutely no way I can do this with an array and a loop?
Developers Jos Posted April 10, 2008 Developers Posted April 10, 2008 This seems pretty inefficient for people that have a lot of files to install. There is absolutely no way I can do this with an array and a loop?The thing to understand here is that the files that are "FileIncluded" are included at Compilation time, NOT when the scrip runs, thus there is no way that variables can be supported. 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.
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