Jump to content

Adding resources to compiled .exe


Recommended Posts

Using AutoIt3Wrapper under the "Res Add Files" I place the whole path to the file I want to compile with the application. Now how to I get to the file within the .exe?

Example:

#AutoIt3Wrapper_Res_File_Add=C:\Users\Rogue\Script\Resource\background.png

I added this line but now how do I get the path to this .png file? I checked the Help file with AutoIt3Wrapper but it uses DllCall to play the sound which doesn't instruct me how to get to the file path.

Trying to avoid FileInstall(), I would like to not create any temp files on the computer. Plus this would be a great learning experiance! Thanks for the help in advance!

Link to comment
Share on other sites

  • Moderators

rogue5099,

Check out Zedna's Resources UDF - it allows you to use the items you have put in the resource table. :oops:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Melba23,

Thank you once again! You gave me direction and I figured it out.

#AutoIt3Wrapper_Res_File_Add=C:UsersRogueScriptsResourcebackground.jpg, rt_rcdata, BACKGROUND

$cPic = GUICtrlCreatePic("", 224, 340, 120, 60)
_ResourceSetImageToCtrl($cPic, "BACKGROUND", $rt_rcdata)
Edited by rogue5099
Link to comment
Share on other sites

  • 11 years later...

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

×
×
  • Create New...