Jump to content

Recommended Posts

Posted

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

Posted

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 :)
Posted

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

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...