Sign in to follow this  
Followers 0
EliTe_ThuT

Compile

9 posts in this topic

Hey,

I wanted to know if there was a way to do like c++ and to include a image file inside a .exe (when compiling) so we can use it in that script without having to have the image in a directory or something...

Thx

Share this post


Link to post
Share on other sites



I was just going to post that in the AutoIt Feature Requests, but I did a search.. And I found yours, but I think its been asked before.. I will edit in a minute.

File Install to temp, file delete from temp :)

Share this post


Link to post
Share on other sites

Far as I know... there is no other way :)

But what is this install temp way??

Share this post


Link to post
Share on other sites

FileInstall("blah.jpg", @TempDir & "\blah.jpg", 1) ; Install from script's dir to windows temp dir and overwrite if already exists
; The rest of your code here
FileDelete(@TempDir & "\blah.jpg") ; Delete the file before the script end
Exit

Share this post


Link to post
Share on other sites

FileInstall("blah.jpg", @TempDir & "\blah.jpg", 1) ; Install from script's dir to windows temp dir and overwrite if already exists
; The rest of your code here
FileDelete(@TempDir & "\blah.jpg") ; Delete the file before the script end
Exit

But why would people use that...if they need the image...and if it's in the script dir...just call it from the script dir...why installing it to temp???

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

It's so simple. You use this trick if you don't want your users to see what the graphics of your script are.

In addition if you don't want even to alter them, you may use MD5 or other hashes to check either each file's integrity and so on.

If you don't see a reason to use such a thing, then don't. Use the classic way instead.

Edited by erebus

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  
Followers 0