Jump to content
Sign in to follow this  
DW1

FileInstall

Recommended Posts

DW1

I have done plenty of fileinstalls and never had an issue, but now when I try to compile this:

#include<IE.au3>
#include<file.au3>
#include<guiconstants.au3>
If Not FileExists( @TempDir & "\DR1.ico" ) Then FileInstall( @DesktopDir & "\DR1.ico", @TempDir & "\DR1.ico")
If Not FileExists( @TempDir & "\DR2.ico" ) Then FileInstall( @DesktopDir & "\DR2.ico", @TempDir & "\DR2.ico")
If Not FileExists( @TempDir & "\DR3.jpg" ) Then FileInstall( @DesktopDir & "\DR3.jpg", @TempDir & "\DR3.jpg")
If Not FileExists( @TempDir & "\DR4.ico" ) Then FileInstall( @DesktopDir & "\DR4.ico", @TempDir & "\DR4.ico")

I get this error:

Invalid FileInstall() function:

If Not FileExists( @TempDir & "\DR1.ico" ) Then FileInstall( @DesktopDir & "\DR1.ico", @TempDir & "\DR1.ico"

While running in scite everything works fine, even the fileinstall, the files get placed in the temp dir and everything displays fine... just won't let me compile.

why?

how can I fix this?

Thanks in advance

Share this post


Link to post
Share on other sites
GaryFrost

The source path of the file to compile. This must be a literal string; it cannot be a variable.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
Generator
The source path of the file to compile. This must be a literal string; it cannot be a variable.

Share this post


Link to post
Share on other sites
Tiger

that is right

#include<IE.au3>
#include<file.au3>
#include<guiconstants.au3>
If Not FileExists( @TempDir & "\DR1.ico" ) Then FileInstall("C:\DR1.ico", @TempDir & "\DR1.ico")
If Not FileExists( @TempDir & "\DR2.ico" ) Then FileInstall("C:\DR2.ico", @TempDir & "\DR2.ico")
If Not FileExists( @TempDir & "\DR3.jpg" ) Then FileInstall("C:\DR3.jpg", @TempDir & "\DR3.jpg")
If Not FileExists( @TempDir & "\DR4.ico" ) Then FileInstall("C:\DR4.ico", @TempDir & "\DR4.ico")

My UDFs:- _RegEnumKey

Share this post


Link to post
Share on other sites
Generator

I have done plenty of fileinstalls and never had an issue, but now when I try to compile this:

#include<IE.au3>
#include<file.au3>
#include<guiconstants.au3>
If Not FileExists( @TempDir & "\DR1.ico" ) Then FileInstall( @DesktopDir & "\DR1.ico", @TempDir & "\DR1.ico")
If Not FileExists( @TempDir & "\DR2.ico" ) Then FileInstall( @DesktopDir & "\DR2.ico", @TempDir & "\DR2.ico")
If Not FileExists( @TempDir & "\DR3.jpg" ) Then FileInstall( @DesktopDir & "\DR3.jpg", @TempDir & "\DR3.jpg")
If Not FileExists( @TempDir & "\DR4.ico" ) Then FileInstall( @DesktopDir & "\DR4.ico", @TempDir & "\DR4.ico")

I get this error:

While running in scite everything works fine, even the fileinstall, the files get placed in the temp dir and everything displays fine... just won't let me compile.

why?

how can I fix this?

Thanks in advance

What you can do is extract all your files in a temp folder, and if the files don't exist you can use filemove, if they exists just use filedelete to delete all your temp files, other than that use flag 1 which is overwrite.

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  

×