Jump to content

Recommended Posts

Posted

Hi Folks!

Need to embed an image into a script. I understand the following well enough:

"...Images are not embedded in the executable unless you use FileInstall..."

Cool feature!

But, the example provided leaves me wanting a bit more info:

$destination = @TempDir & "\mySplash.bmp"
FileInstall("C:\foo.bmp", $destination) ;source must be literal string
SplashImageOn("Splash Screen", $destination)
Sleep(3000)
SplashOff()

The nut:

$destination = @TempDir & "\mySplash.bmp"

Wuzzup here? Are we trying to provide an alternate destination in addition to the system's defined temp dir?

Hmmm...

The following should work as well, based upon the syntax:

$destination = @TempDir
FileInstall("C:\foo.bmp", $destination) ;source must be literal string
SplashImageOn("Splash Screen", $destination)
Sleep(3000)
SplashOff()

Shouldn't it???

:(

Thanks in advance for the good-natured help . . .

[center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center]

Posted

The following should work as well, based upon the syntax:

$destination = @TempDir
FileInstall("C:\foo.bmp", $destination);source must be literal string
SplashImageOn("Splash Screen", $destination)
Sleep(3000)
SplashOff()

Shouldn't it???

Nope. FileInstall wants, nay, needs, a complete path, including a filename. Your example would have the app attempt to install the file to the value of the %TEMP% variable (usually %USERPROFILE%\Local Settings\Temp on Win2K/XP). General badness would ensue. (Actually, it would probably just throw an error.)

@TempDir & "\mySplash.bmp" is not an alternate location, it is a complete path specification. '&' is the concatenation character, so the path is equivalent to %TEMP%\mySplash.bmp in DOS terms.

Hope that helps,

BlueBearr

BlueBearrOddly enough, this is what I do for fun.
Posted

AFAIK

1st param = where it came from (path & filename)

2nd param = where it needs to be (path & filename)

so fileinstall("c:\foo.txt", "d:\hax.txt")

would embed the file from c:\foo.txt

and when executed, "foo.txt" would be put in D:\ under the name "hax.txt"

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Posted

Thank you, folks.

Just a little more flesh on the bones for me now :(

Have a great day!

[center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center]

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
×
×
  • Create New...