Sign in to follow this  
Followers 0
MrDelta1

BMP inside exe

23 posts in this topic

Hi guys :)

I have a question :) if you put a image or something in your script you must give the adress where the image is.

Is it possible to save the bmp or other file inside the exe so you don't have,for example 3 bmp files and a exe but 1 exe with the bmp('s) saved in it.

I thougt it was possible because I have seen it before.

Thanks alot :P


Share this post


Link to post
Share on other sites



Hi guys :)

I have a question :) if you put a image or something in your script you must give the adress where the image is.

Is it possible to save the bmp or other file inside the exe so you don't have,for example 3 bmp files and a exe but 1 exe with the bmp('s) saved in it.

I thougt it was possible because I have seen it before.

Thanks alot :P

FileInstall() is the AutoIt method for that. If you want to avoid copying the file to the hard drive, you can pack the files into the .exe with some utilities, but AutoIt won't be able to reference them until copied out to the disk... which points you back to FileInstall().

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

I have googled but I can not find a good programm does somebody know one ?


Share this post


Link to post
Share on other sites

I have googled but I can not find a good programm does somebody know one ?

Look for posts by Zedna, he's done this in the Example forum.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

I have found it and look true it. Now if download his recources files and the au3. I have put it in the same map but and then run it but nothing happens I only get a empty screen :) .


Share this post


Link to post
Share on other sites

I have found it and look true it. Now if download his recources files and the au3. I have put it in the same map but and then run it but nothing happens I only get a empty screen :) .

I haven't personally used it, I use FileInstall() >> Temp Dir >> Delete when done method.

You'd need to post specific questions on that topic in that thread, not only to help you, but when it is answered it may help others as well.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

I have found it and look true it. Now if download his recources files and the au3. I have put it in the same map but and then run it but nothing happens I only get a empty screen :) .

Do you have SciTE4AutoIt3 installed and Reshacker downloaded ?

Did the resources get added to your exe file ?


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

No I did not downloaded reshacker what is it and where can I download it ?


Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

http://www.download.com/Resource-Hacker/30...tml?tag=lst-0-1

It's what we use to add our extras via Jdebs work with SciTE and AutoIt3Wrapper.

Download that and stick the contents in your ..\AutoIt3\SciTE\AutoIt3Wrapper directory.

Edit:

If you don't have the full version of SciTE then look at Jdebs signature above for links to it.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

I have downloaded the full version and put the resourcehacker files in the \AutoIt3\SciTE\AutoIt3Wrapper directory. But what am I suposed to do now ?

Sorry I am new and I'm still learning so I don't get all wat you guys say :) .


Share this post


Link to post
Share on other sites

I have found it and look true it. Now if download his recources files and the au3. I have put it in the same map but and then run it but nothing happens I only get a empty screen :) .

You must compile example scripts and run compiled EXE.

When you run it not compiled it will not work.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

I have downloaded the full version and put the resourcehacker files in the \AutoIt3\SciTE\AutoIt3Wrapper directory. But what am I suposed to do now ?

Sorry I am new and I'm still learning so I don't get all wat you guys say :) .

Open examples (AU3) in Scite4AutoIt3 and press F7 (Compile).

Then run compiled output EXE

It's so simple :-)

Edited by Zedna

Share this post


Link to post
Share on other sites

I already tried it. Does it matter that I am on a pc running with win 2000 ?


Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

I already tried it. Does it matter that I am on a pc running with win 2000 ?

This should be OK.

My examples are successfully tested on WIN98SE, WINXP.

Post output from your Scite Output window with informations about compiling.

It appears at bottom of Scite after you press F7.

From these informations we can see what's going on.

Edited by Zedna

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

It works fine now :) I know what the problem was I opend the compiler.exe but now I know you only have to press f7 in scite. Thanks alot for you're help and time :">

EDIT:

Is there also a way to compress it because the files are pretty large right now or must I just send the exe in a zip or something ?

Edited by MrDelta1

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

Is there also a way to compress it because the files are pretty large right now or must I just send the exe in a zip or something ?

Instead of

#AutoIt3Wrapper_Res_File_Add=image1.bmp, bitmap, TEST_BMP_1

you can use

#AutoIt3Wrapper_useupx=n

#AutoIt3Wrapper_Res_File_Add=image1.bmp, bitmap, TEST_BMP_1

#AutoIt3Wrapper_run_after=upx.exe --best "%out%"

Maybe you must use absolute path for upx.exe: "c:\Program Files\AutoIt3\Aut2Exe\upx.exe"

Output EXE will be smaller but in reshacker isn't bitmap visible so I can't give any garance.

Use it if it will be working OK for you.

In my examples with my testing bitmaps this works fine also with this compression.

I will post that also in my UDF topic.

Edited by Zedna

Share this post


Link to post
Share on other sites

Hi I have a problem with my script.

The problem is that I don't see the resource image after compiling what is wrong with my script ?

#Region;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=Zip.ico
#AutoIt3Wrapper_Res_File_Add=C:\Documents and Settings\Administrator\Desktop\resource_data\image2.bmp,23,file
#EndRegion;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#include <resources.au3>

; 
$about = GUICreate("About", 324, 241, 303, 219)
GUISetIcon("D:06.ico")



$GroupBox1 = GUICtrlCreateGroup("", 8, 8, 305, 185)
$Image1 = GUICtrlCreatePic("file", 161, 122, 105, 97, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("Product Name", 152, 24, 152, 17, $WS_GROUP)
$Label2 = GUICtrlCreateLabel("Version", 152, 48, 151, 17, $WS_GROUP)
$Label4 = GUICtrlCreateLabel("Comments", 16, 160, 53, 17, $WS_GROUP)
$Label3 = GUICtrlCreateLabel("Copyright", 16, 136, 48, 17, $WS_GROUP)
$Progress1 = GUICtrlCreateProgress(16, 176, 281, 9)
$Label5 = GUICtrlCreateLabel("Label5", 152, 96, 140, 17)
$Label6 = GUICtrlCreateLabel("Label6", 152, 72, 148, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("&OK", 112, 208, 75, 25)
GUISetState(@SW_SHOW)

_ResourceSetImageToCtrl($image1, "file", $RT_BITMAP)
;


While 1
Sleep(20)

WEnd

Share this post


Link to post
Share on other sites

Hi I have a problem with my script.

The problem is that I don't see the resource image after compiling what is wrong with my script ?

instead of

#AutoIt3Wrapper_Res_File_Add=C:\Documents and Settings\Administrator\Desktop\resource_data\image2.bmp,23,file

use

#AutoIt3Wrapper_Res_File_Add=C:\Documents and Settings\Administrator\Desktop\resource_data\image2.bmp,bitmap,file

Read carefully my topic about resources with all examples!

Share this post


Link to post
Share on other sites

I finally did it :) (after 2 hours finding out how to do it :) )


Share this post


Link to post
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
Sign in to follow this  
Followers 0