unclefishy Posted May 17, 2006 Posted May 17, 2006 SO... I am trying to figure out if there is any way to embed the source file into the exe, so I wouldn't need to both files in order to run smoothly... like take the winzip tutorial for example... in order for the script to work you also need to have the winzip file located... somewhere. I want to know it I can embed this file into the script's exe so there is only one file to manage. so I can just run the exe from where-ever and it will install flawlessly. with out haveing to also copy over the actual winzip application, and if so... what would be the path that I would use for the Run command. or am I better off just dumping the programs that we install for a roll-out on a network share drive somewhere and hardcoding the path into the exe Thanks in advance... this program will change my life... as soon as I master it Uncelfishy
unclefishy Posted May 17, 2006 Author Posted May 17, 2006 DOH!!! see i knew it was an easy one thanks "Valuater"
unclefishy Posted May 17, 2006 Author Posted May 17, 2006 does it matter where this command is located in the script? i.e. before or after the "run" command?
Valuater Posted May 17, 2006 Posted May 17, 2006 (edited) $Program_1 = @TempDir & "\Temp1.exe" FileInstall("C:\Program Files\AutoIt3\beta\Au3Info.exe", $Program_1) Run($Program_1) 8) Edited May 18, 2006 by Valuater
Nomad Posted May 17, 2006 Posted May 17, 2006 Hmm, I'm trying to use this to install a .gif image in my script so that I don't have to have the .gif image separate from the .exe for when I give this program to someone else, but it doesn't seem to be working. If I move the .gif image to a different folder after I compile the script, it doesn't appear when I run the program, but it does if I leave it in the folder. How would I include the .gif without having to send the .gif with the .exe?
Valuater Posted May 17, 2006 Posted May 17, 2006 as you stated it... it should work.... it does for me please post code so we can verify proper useage 8)
BigDod Posted May 17, 2006 Posted May 17, 2006 (edited) Hmm, I'm trying to use this to install a .gif image in my script so that I don't have to have the .gif image separate from the .exe for when I give this program to someone else, but it doesn't seem to be working. If I move the .gif image to a different folder after I compile the script, it doesn't appear when I run the program, but it does if I leave it in the folder.How would I include the .gif without having to send the .gif with the .exe?Post your code so that we can advise what you are doing wrong.Edit - Shit I never know when these anon users are posting. Edited May 17, 2006 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Nomad Posted May 17, 2006 Posted May 17, 2006 fileinstall("C:\WINDOWS\Desktop\GUI\Nomad.gif", "C:\WINDOWS\Desktop\GUI\GUIPIX2.au3") I've also tried this: fileinstall("C:\WINDOWS\Desktop\GUI\Nomad.gif", "C:\WINDOWS\Desktop\GUI\GUIPIX2.exe")
BigDod Posted May 17, 2006 Posted May 17, 2006 fileinstall("C:\WINDOWS\Desktop\GUI\Nomad.gif", "C:\WINDOWS\Desktop\GUI\GUIPIX2.au3")I've also tried this:fileinstall("C:\WINDOWS\Desktop\GUI\Nomad.gif", "C:\WINDOWS\Desktop\GUI\GUIPIX2.exe")You have to specify where you want to place the gif file. What you are doing is giving it a completely different name. I would guess that in your script you are calling it from "C:\WINDOWS\Desktop\GUI\Nomad.gif" when you are using it. You should call it up from where you install it to not the original source. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Nomad Posted May 17, 2006 Posted May 17, 2006 You have to specify where you want to place the gif file. What you are doing is giving it a completely different name. I would guess that in your script you are calling it from "C:\WINDOWS\Desktop\GUI\Nomad.gif" when you are using it. You should call it up from where you install it to not the original source.Ok, I think I get what you are saying, I'm going to try a couple things and get back to you. Thanks.
Valuater Posted May 17, 2006 Posted May 17, 2006 its a gif.... save it as a giffileinstall("C:\WINDOWS\Desktop\GUI\Nomad.gif", "C:\WINDOWS\Desktop\GUI\GUIPIX2.au3")I've also tried this:fileinstall("C:\WINDOWS\Desktop\GUI\Nomad.gif", "C:\WINDOWS\Desktop\GUI\GUIPIX2.exe")not au3 or exe8)
JoshDB Posted May 17, 2006 Posted May 17, 2006 FileInstall uses two parameters: FileInstall(Parameter 1, Parameter 2) Parameter 1 is where to find it. Parameter 2 is where to unpack it to when the FileInstall command is reached. When compiling your source, the source file (in your case the .gif) is packaged up into it, and you use fileinstall to bring it back out. Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite
Nomad Posted May 17, 2006 Posted May 17, 2006 FileInstall uses two parameters:FileInstall(Parameter 1, Parameter 2)Parameter 1 is where to find it. Parameter 2 is where to unpack it to when the FileInstall command is reached.When compiling your source, the source file (in your case the .gif) is packaged up into it, and you use fileinstall to bring it back out.Yeah, I figured that out, finally, LOL. I did this since the @TempDir didn't work for me for some reason:$GIF1 = @ScriptDir & "\Nomad.gif"fileinstall("C:\WINDOWS\Desktop\Nomad.gif", $GIF1)I hid the .gif just to see if it would still show in the program, and it did. I also checked to see if the .gif was installed to the script directory, and it was.. even though I hid the source file, so it is in the .exe.I guess you have no choice but to install the .gif somewhere on the computer to be able to run it?
Valuater Posted May 17, 2006 Posted May 17, 2006 (edited) I guess you have no choice but to install the .gif somewhere on the computer to be able to run it?true, however the @tempdir is located atdrive \ doc & settings \ user \ local settings \ temp \most people dont look there8) Edited May 17, 2006 by Valuater
Nomad Posted May 17, 2006 Posted May 17, 2006 Ok, I also figured out why the @TempDir wasn't working. I forgot to change the script and tell it to look in the @TempDir to find the .gif when calling the .gif to display it... duh. Thanks for the help, this will really help me out with this script since I have a few other images and .wav files I would like to do this to as well.
Valuater Posted May 17, 2006 Posted May 17, 2006 (edited) welcome kinda like me ; Installs $Program_1 = @TempDir & "\Temp1.exe" FileInstall("C:\Program Files\AutoIt3\beta\Au3Info.exe", $Program_1) $Program_3 = "";@TempDir & "\Temp3.exe" ;FileInstall("C:\Program Files\AutoIt3\beta\AutoIt3.exe", $Program_3) $Sound_lnk = @TempDir & "\Sound_lnk.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Notify.wav", $Sound_lnk) $Sound_clk = @TempDir & "\Sound_clk.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Clickerx.wav", $Sound_clk) $Sound_grp = @TempDir & "\Sound_grp.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Group_open.wav", $Sound_grp) $Sound_bar = @TempDir & "\Sound_msg.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\message.wav", $Sound_bar) $My_pic = @TempDir & "\XPClean.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\XPClean.jpg", $My_pic) $Icon_pic = @TempDir & "\Icon.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\icon-scrn.jpg", $Icon_pic) $Sample_pic = @TempDir & "\Sample.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\Sample-GUI.jpg", $Sample_pic) $Logo_jpg = @TempDir & "\Logo-au3.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\au3-logo.jpg", $Logo_jpg) $Builder_pic = @TempDir & "\GUI-Lnch.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\GUIBuilder.jpg", $Builder_pic) $Wall_pic = @TempDir & "\Wall-pic.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\AutoIt-wall.jpg", $Wall_pic) $Notepad_pic = @TempDir & "\Notepd-pic.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\Notepad.jpg", $Notepad_pic) $AU3Info_pic = @TempDir & "\AU3Info-pic.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\AU3Info.jpg", $AU3Info_pic) $Ball_pic = @TempDir & "\Ball-pic.jpg" FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\Curveball.jpg", $Ball_pic) SplashImageOn("", $Logo_jpg, 400, 300, -1, -1, 1) SoundPlay($Sound_lnk, 1) 8) Edited May 18, 2006 by Valuater
unclefishy Posted May 18, 2006 Author Posted May 18, 2006 thank you all very much... I got it!!! Whoo-HOO!!!
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