Jump to content

Recommended Posts

Posted

I'm trying to embed the EzSkin files into my .EXE. Below is the code, from another topic, that works:

Func OnAutoItStart ()
DirCreate ( @ScriptDir & "\EzSkin" )
$destination = @ScriptDir & "\EzSkin"
FileInstall("C:\Documents and Settings\Home\Desktop\EzSkin\1.bmp" , $destination & "\1.bmp" , 1)
FileInstall("C:\Documents and Settings\Home\Desktop\EzSkin\2.bmp" , $destination & "\2.bmp" , 1)
FileInstall("C:\Documents and Settings\Home\Desktop\EzSkin\3.bmp" , $destination & "\3.bmp" , 1)
[truncated]
EndFunc

Func OnAutoItExit ( )
    DirRemove( @ScriptDir & "\EzSkin", 1)
EndFunc

However, this creates the EzSkin directory in the script's working directory and doesn't look very professional.

I have tried to put it in a temp folder instead:

Func OnAutoItStart ()
DirCreate ( @TempDir & "\EzSkin" )
$destination = @TempDir & "\EzSkin"
FileInstall("C:\Documents and Settings\Home\Desktop\EzSkin\1.bmp" , $destination & "\1.bmp" , 1)
FileInstall("C:\Documents and Settings\Home\Desktop\EzSkin\2.bmp" , $destination & "\2.bmp" , 1)
FileInstall("C:\Documents and Settings\Home\Desktop\EzSkin\3.bmp" , $destination & "\3.bmp" , 1)
[truncated]
EndFunc

Func OnAutoItExit ( )
    DirRemove( @TempDir & "\EzSkin", 1)
EndFunc

The files get copied to the TempDir when I run the program, but it pops up an error message: "$ESkin_Folder - was not found". :)

What am I doing wrong?

Posted

I'm starting to think it's hardcoded to look for the files in \Scriptdir\EzSkin... I tried this code:

$ESkin_Folder = @WindowsDir & "\Temp\EzSkin"

To no avail :)

Posted (edited)

if you use @TempDir, this should be

$ESkin_Folder = @TempDir & "\EzSkin" :)

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

if you use @TempDir, this should be

$ESkin_Folder = @TempDir & "\EzSkin" :)

Haha, yes I was fiddling around, actually meant what you wrote- didn't work.

I have solved it though, by using XSkin which allows you to define the $Skin_folder.

$Skin_Folder = @TempDir & "\MySkin" :(

Posted

Glad you got it to work for you faire.

As I have been asked numerous times..

The EzSkin Location is hard coded, however, this may changed very easily.

just look at line # 698 you will see... (or just search for @ScriptDir)

Global $213A908B3713BB99 = @ScriptDir & $213AE08D5A13BB99

You may change this @ScriptDir to any folder/location you wish.

You should not make any other changes.. just the folder location

8)

NEWHeader1.png

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