YoseMite Posted November 20, 2005 Share Posted November 20, 2005 Hi, Is it possible in AutoITscript to include a picture in a .exe file? So that I not a extern picture have.. Thanks, YoseMite Link to comment Share on other sites More sharing options...
Valuater Posted November 20, 2005 Share Posted November 20, 2005 yes..FileInstall()help has very good demo's at the bottom of each pageon your computer press the followingStart > All Programs > Autoit v3 > Autoit Help Filewhen that loads then press the "search" tabthen type in "?your search?" and press "List Topics"**** you can do this with any word you wantthats what i do all the time8) Link to comment Share on other sites More sharing options...
YoseMite Posted November 20, 2005 Author Share Posted November 20, 2005 Ok thanks. But I want a picture in the *.exe so that I can load the GUI with the picture. And that the picture doesn't load in a folder.. Link to comment Share on other sites More sharing options...
Valuater Posted November 20, 2005 Share Posted November 20, 2005 ok... the fileinstall() will place the external picture inside the exe... when you run the exe.. it will set the picture in a temp folder... if you use this style ( this is what i use ) $Logo_jpg = @TempDir & "\XPClean-logo.jpg" FileInstall("C:\XPClean-web\Settings\XPClean-pics\XPClean-Main-Pic-Jpg.jpg", $Logo_jpg) ;source must be literal string the temp file is hard to find and some one would have to look for it C:\ >documents and settings > username > local settings(usually hidden) > temp then... when the script is terminated.. you can delete the picture from the temp folder.. that way it is only exposed while your script is running 8) Link to comment Share on other sites More sharing options...
PartyPooper Posted November 20, 2005 Share Posted November 20, 2005 Thanks for that expanded explanation of how FileInstall works Valuater. Just say I'm not concerned about whether or not the user sees the pictures, would there be any benefit to using FileInstall? I'm thinking that using FileInstall will slow the execution of the script down because of it's increased size and I may be better off just including a 'picture' directory with the script. Would this be a truism? Thanks Link to comment Share on other sites More sharing options...
SpookMeister Posted November 20, 2005 Share Posted November 20, 2005 Make it conditional. Have it check if the file exists first, then only if it isnt there install the picture. This would make the copy only happen the first time they run it. Not to mention that the time involved for copying a reasonable sized image file will not be very long at all. [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Sokko Posted November 20, 2005 Share Posted November 20, 2005 Thanks for that expanded explanation of how FileInstall works Valuater. Just say I'm not concerned about whether or not the user sees the pictures, would there be any benefit to using FileInstall? I'm thinking that using FileInstall will slow the execution of the script down because of it's increased size and I may be better off just including a 'picture' directory with the script. Would this be a truism?If you're not concerned about that, the sole benefit of FileInstall is convenience. It's easier to distribute a single file without anything else connected to it and know that, no matter what situation you put it in, it will run correctly, and it's not possible to accidentally delete or move any of its resources. The only slowdown that occurs is when the files are initially extracted from the executable. Plus, if you just leave them in the temp folder and don't delete them, this only needs to happen once.Make it conditional. Have it check if the file exists first, then only if it isnt there install the picture. This would make the copy only happen the first time they run it.FileInstall already does this by default. It will only extract the file if it doesn't already exist at the target location. Adding a third "1" parameter, on the other hand, will make it overwrite the file every time, as in FileInstall("source","destination",1). Useful during development when you are changing the contents of the installed file. Link to comment Share on other sites More sharing options...
PartyPooper Posted November 20, 2005 Share Posted November 20, 2005 Thanks Sokko. Link to comment Share on other sites More sharing options...
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