Jump to content

BMP inside exe


MrDelta1
 Share

Recommended Posts

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

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

  • Moderators

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.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

  • Developers

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 ?

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.
  :)

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
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 :) .

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

Then run compiled output EXE

It's so simple :-)

Edited by Zedna
Link to comment
Share on other sites

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

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

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

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...