Jump to content

Recommended Posts

Posted

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
Posted

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.
  :)

Posted

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
Posted

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.

:D

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.
  :)

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
  • Recently Browsing   0 members

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