Marcus Posted May 31, 2005 Posted May 31, 2005 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]
bluebearr Posted May 31, 2005 Posted May 31, 2005 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.
w0uter Posted May 31, 2005 Posted May 31, 2005 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
Marcus Posted June 1, 2005 Author Posted June 1, 2005 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]
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