Jump to content

FileInstall issue


Recommended Posts

I'm trying to include a small JPG for my splashscreen, and it looks like I have to use FileInstall.

Here's the odd part: the script works fine, unless I compile it!

It works fine all day as a script, but not as an EXE. :)

What am I doing wrong?

#region                         |------SPLASH SCREEN------|
; A nice little splash screen :-)
$Splash = @TempDir & "\SplashScreen.jpg"
FileInstall("\\server\share$\folder\folder\SplashScreen.jpg", @TempDir, 1)
SplashImageOn("SomeTitle", $Splash, "-1", "-1", "-1", "-1", 1)
Sleep(3000)
SplashOff()
#endregion                      |------SPLASH SCREEN------|

When the GUI is closed, I cleanup with:

; When the GUI unloads/exits, we need to remove the splashscreen file
; that we loaded to the user's temp dir
FileDelete($Splash)
Link to comment
Share on other sites

Update: I thought it might be because I'm using an UNC address to wrap the JPG into the EXE, but I moved the script to a local folder along with the JPG...same issue, works as a script but not as an EXE...

:)

Link to comment
Share on other sites

  • Developers

Update: I thought it might be because I'm using an UNC address to wrap the JPG into the EXE, but I moved the script to a local folder along with the JPG...same issue, works as a script but not as an EXE...

:)

<{POST_SNAPBACK}>

Probably because you don't have a trailing backslash:

The destination path with trailing backslash. This can be a variable.

try:

FileInstall("\\server\share$\folder\folder\SplashScreen.jpg", $Splash, 1)

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

try...

FileInstall("\\server\share$\folder\folder\SplashScreen.jpg", $Splash, 1)

<{POST_SNAPBACK}>

That gives me a syntax error from the FileInstall function. I think it's because my var $Splash references a file instead of a folder. Will FileInstall accept a file instead of a folder location for the "dest" part?

Thanks for the reply Larry! :)

Link to comment
Share on other sites

Probably because you don't have a trailing backslash:

try:

FileInstall("\\server\share$\folder\folder\SplashScreen.jpg", $Splash, 1)

<{POST_SNAPBACK}>

Hey, that worked. Instead of using @TempDir, I set a new var to add the trailing backslash.

$TempDir = @TempDir & "\"

After updating all the other img references, and re-compile, it works great.

Thanks! :)

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