Sign in to follow this  
Followers 0
billthecreator

Added the file to my program, now i want to use it

15 posts in this topic

i have a background that i want to include in the exe

#AutoIt3Wrapper_Res_File_Add=TPBBK.bmp, RT_BITMAP, TPBBK_bmp, 0

what do i do from here???

GUICtrlCreatePic("", 0, 0, 338, 120, $BS_BITMAP)
GUICtrlSetImage(-1, @ScriptFullPath, "TPBBK_bmp")

this is what i have, and it's not working after i compile

ive searched the forum for about an hour, and what i found looks like i need to add way more UDFs and other stuff, idk. please help me, thank you


[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Share this post


Link to post
Share on other sites



billthecreator,

All you need is Zedna's excellent Resources UDF which you find here.

Do not be put off by the 21 pages of posts - all you need is in Zedna's first post, as long as you read it carefully. You MUST try out the examples so that you understand how it works before moving on. :(

Come back if you run into problems, but it is not difficult to use - as long as you get the right syntax.

M23

P.S. And do not forget to disable the background image once you get it displayed or none of the other controls will work. :)


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

i have a background that i want to include in the exe

what do i do from here???

You want the image file to be part of the exe so all you need is the exe? (That's what I gather from your question) If that is the case, look into fileinstall in the helpfile.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

You want the image file to be part of the exe so all you need is the exe? (That's what I gather from your question) If that is the case, look into fileinstall in the helpfile.

but i dont want it to take the image, and install it on the computer, i want it in the exe and used in the exe, not used in storage. i think the first answer will work, but i cant try it until i get home

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Share this post


Link to post
Share on other sites

billthecreator,

Zedna's UDF will do exactly what you want. :(

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

ok, i tried a few things, and nothing still. this is what i have

#AutoIt3Wrapper_Res_File_Add=TPBBK.bmp, rt_bitmap, TPBBK_bmp
#include "resources.au3"

$pic1  = GUICtrlCreatePic("", 0, 0, 338, 120)
_ResourceSetImageToCtrl($pic1, "TPBBK_bmp", $RT_BITMAP)
GUICtrlSetState($pic1, $GUI_DISABLE)

and after i compile it, nothing shows up

Edited by billthecreator

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Share this post


Link to post
Share on other sites

billthecreator,

Your code works for me if I use one of my bitmaps. :(

#AutoIt3Wrapper_Res_File_Add=fred.bmp, rt_bitmap, TPBBK_bmp

#include "resources.au3"

#include <GUIConstantsEx.au3>

$hGUI = GUICreate("Test", 500, 500)

$pic1  = GUICtrlCreatePic("", 0, 0, 338, 120)
_ResourceSetImageToCtrl($pic1, "TPBBK_bmp", $RT_BITMAP)
GUICtrlSetState($pic1, $GUI_DISABLE)

GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Is the UDF in the same folder as the script? Is the .bmp in the same folder as the script? If you use ResHacker (which you can dowmload from here) does the resource appear in your exe file?

Keep at it - it does work, honest! :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

Is the UDF in the same folder as the script? Is the .bmp in the same folder as the script? If you use ResHacker (which you can dowmload from here) does the resource appear in your exe file?

Keep at it - it does work, honest! :(

M23

yes, everything is in the right spot. all of it. but, maybe... i have it all in a function, a function is called to create the GUI. do you think that is it?

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Share this post


Link to post
Share on other sites

billthecreator,

Let us see the code and then we can tell you!

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

i would be happy to, but this is a golden script... but

ok.. sure, but after its resolved, im removing it from here, although some will have a copy, it wont be too bad...

edit: program removed

as for the background... its too big to upload, but you can use any bmp

Edited by billthecreator

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Share this post


Link to post
Share on other sites

billthecreator,

I get my image in the background of your "µTor/TPB AutoFill" GUI. :(

Have you checked with ResHacker (or similar) that you are actually loading the image resource into your exe?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

yes, and nothing is happening, i even changed directories.. i wonder if the bmp is to big

im just going to try to do a file install, this is annoying

Edited by billthecreator

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Share this post


Link to post
Share on other sites

yes, and nothing is happening, i even changed directories.. i wonder if the bmp is to big

im just going to try to do a file install, this is annoying

If you're going to use file install then you might want to install it to @TempDir & "\mybmp.bmp" and then FileDelete(@TempDir & "\mybmp.bmp") on exit.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

im just going to try to do a file install, this is annoying

This is quite common behaviour of many people here :-(

Instead of careffully reading my Resources UDF first topic and trying my examples

they rather try their own wrong code and after a while they switch to simpler FileInstall().

It's a pity but everybody can do what is the best for them.

My advice:

- you must have installed latest version of scite4autoit3

- I think you have resources related code OK but your GUI code is wrong

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