sweetaleena Posted May 14, 2016 Posted May 14, 2016 I have tried multiple times to understand the guides for including pictures within my exe, but I just cant seem to grasp it, its on just a wholeeee other level of skill from what I can do. Is there a simple way to achieve this? My script is complete and ready, I just need to include the images instead of having to load them from a folder on my computer.
AutoBert Posted May 14, 2016 Posted May 14, 2016 You can use to include pictures in your script. When you post a runable reproducer script and the pic's you want have to included, somone will extend your script with the pictures.
sweetaleena Posted May 14, 2016 Author Posted May 14, 2016 9 hours ago, AutoBert said: You can use to include pictures in your script. When you post a runable reproducer script and the pic's you want have to included, somone will extend your script with the pictures. Going to assume this does not work with splashimages </3 everything I have tried just makes it crash.
Developers Jos Posted May 14, 2016 Developers Posted May 14, 2016 Maybe you can show the code that you have and isn't working, and also define what exactly is (not) happening? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
orbs Posted May 15, 2016 Posted May 15, 2016 @sweetaleena, welcome to AutoIt and to the forum! have you looked into FileInstall() ? that's the simplest way. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
sweetaleena Posted May 15, 2016 Author Posted May 15, 2016 29 minutes ago, orbs said: @sweetaleena, welcome to AutoIt and to the forum! have you looked into FileInstall() ? that's the simplest way. Nope o-o Looking into it now. So for file install I would just display the directory of the image as "\blablala.bmp" and it would just pick it up? >> and by fileinstall does that mean it would plop the images somewhere on the desktop?
orbs Posted May 15, 2016 Posted May 15, 2016 (edited) the help for FileInstall is somewhat lacking, i hope this can explain it better. consider this example: FileInstall('blabla.bmp', @TempDir, 1) FileInstall does 3 different things in 3 different scenarios: 1) when you compile your script to create an executable: that command takes the file 'blabla.bmp' from the script folder (i never tested relative paths) and attaches it to the executable. the 2nd and 3rd parameters are ignored. 2) when someone runs the executable: that command extracts the attached file into the user temporary folder (the user who is running the executable, whoever and wherever they are). the 3rd parameter implies overwrite of the file in the target folder, in case it already exists. 3) when you run the script from SciTE: that command simulates a combination of the above-mentioned operations: it copies the file into the target folder. so, as far as the rest of the script is concerned, it is exactly like the file was attached to the executable and extracted to the folder. read carefully the Remarks section in the help for FileInstall(). i would add to that that you must make sure there is sufficient permissions to the user to extract the file to the target folder. this is why i always use @TempDir - unless i'm writing an installer that requires administrative rights, and even in this case writing to some system folders is not allowed. Edited May 15, 2016 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
sweetaleena Posted May 15, 2016 Author Posted May 15, 2016 14 hours ago, orbs said: the help for FileInstall is somewhat lacking, i hope this can explain it better. consider this example: FileInstall('blabla.bmp', @TempDir, 1) FileInstall does 3 different things in 3 different scenarios: 1) when you compile your script to create an executable: that command takes the file 'blabla.bmp' from the script folder (i never tested relative paths) and attaches it to the executable. the 2nd and 3rd parameters are ignored. 2) when someone runs the executable: that command extracts the attached file into the user temporary folder (the user who is running the executable, whoever and wherever they are). the 3rd parameter implies overwrite of the file in the target folder, in case it already exists. 3) when you run the script from SciTE: that command simulates a combination of the above-mentioned operations: it copies the file into the target folder. so, as far as the rest of the script is concerned, it is exactly like the file was attached to the executable and extracted to the folder. read carefully the Remarks section in the help for FileInstall(). i would add to that that you must make sure there is sufficient permissions to the user to extract the file to the target folder. this is why i always use @TempDir - unless i'm writing an installer that requires administrative rights, and even in this case writing to some system folders is not allowed. can fileinstall be used for things like .bins?
Bowmore Posted May 15, 2016 Posted May 15, 2016 Yes - fileinstall can be used to install any type of file. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
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