Jump to content

Over my head


Recommended Posts

I'm just not understanding the fileinstall function. I've read a few posts, the help file, and it's not coming to me.

1/ I tried it, it seems to do the same thing as file copy?

2/ Is it suppose to be in the same script as the main script/app you are making, or is it suppose to be in a seporate script that installs a particular file into your main script/app?

3/ Is it suppose to install into a script or a compiled exe?

4/ Does this make it possible to create one solitary file? If not what is the purpose?

Basically, what I want to do is put a 3 gifs into an exe file for my final app. This so only the exe will "exist" and the gif wont be seen. I've been told to use the fileinstall, and this will be accomplished, then I see other posts that say compiling images into sripts/apps to form one solid file is not possible.

Then if it is the case where it isn't possible, the idea of fileinstall, where the image is copied to a temp directory doesn't make sense, because technically if one solid file isn't formed, then the image will be in the main directory with the script/app already....so what would be the purpose of copying it to the temp directory?

Help me out and clear this up please.

Thanks.

Link to comment
Share on other sites

What fileinstall does is two different things, depending on whether or not you have compiled the script:

  • If the script is non-compiled (you're runnning it from the editor) -> the specified file will be COPIED to the specified destination;

  • If the script IS compiled (you're running the exe) -> the file is stored inside the exe file when compiling, and when you run the exe itself, fileinstall extracts the file from the exe and places it in the specified folder.
Hope this helped

Regards

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

OK it sounds like the second one is what I want, so here is my question on it now.

1/ It sounds like I have to wait until I have an exe to do this. So does that mean I have to have a second script that will do the fileinstall INTO the already compiled exe?

(What I did was use another script and ran fileinstall(source gif with path, destination exe with path) but it didn't seem to do anything...file size of exe still the same)

2/ Do I have to also put a fileinstall into the exe to tell it where to unpack the pictures to? How exactly would I do that if the pictures don't actually exist and they are inside the exe file?....if that's possible. Or do they just automatically unpack to the same folder that the exe is in?

Thanks.

Link to comment
Share on other sites

I don't think you understand me...or I'm just confused. From what I understand...and have seen from what I tried, Valuator, your code would just copy the sound to the temp dir--and then play that sound from the temp dir. But it isn't telling me how to compile that sound INTO an exe file, which is what I'm having problems with, or not understanding.

Do I put that in my program that I'm going to compile, or do I do that from an external script? I'm doing it, and trying to read what others have done, but just not getting it. And it is frustrating because I know it has to be easy.

And can we stick to images as examples please.

Link to comment
Share on other sites

I don't think you understand me...or I'm just confused. From what I understand...and have seen from what I tried, Valuator, your code would just copy the sound to the temp dir--and then play that sound from the temp dir. But it isn't telling me how to compile that sound INTO an exe file, which is what I'm having problems with, or not understanding.

Do I put that in my program that I'm going to compile, or do I do that from an external script? I'm doing it, and trying to read what others have done, but just not getting it. And it is frustrating because I know it has to be easy.

And can we stick to images as examples please.

simply compile that script.... and there is your answer

8)

for pics its the same

$Logo_jpg = @TempDir & "\Logo-au3.jpg"
FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\au3-logo.jpg", $Logo_jpg)


SplashImageOn("", $Logo_jpg, 400, 300, -1, -1, 1)

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

valuaters code, if compiled will embed the notify.wav into the compiled exe and extract it when ran

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
Link to comment
Share on other sites

Just to be clear about this:

You don't have to do ANYTHING to get the FileInstall files into the compiled EXE. The compiler reads the file locations from the script, and scoops up the files, and puts them into the EXE. Once they're in the EXE, their original locations aren't relevant any longer - but the original locations need to be listed in the script so that the compiler knows where to get them in order to put them into the EXE.

The documentation isn't very clear about this - and I was a bit baffled by it until I tried it, and saw that it just works.

Link to comment
Share on other sites

OK, I got it, thanks. Still don't understand exactly what is going on, but whatever, it is working now.

actually... thats how i feel

I dont know how all this stuff works... it just does... so i take it from there and move forward

( until i crash again..lol )

Valuater

the Hobbiest

8)

NEWHeader1.png

Link to comment
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
 Share

  • Recently Browsing   0 members

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