Jump to content

Zedna Example Script to Load ICO from resources - (Moved)


Recommended Posts

Hi Guys,

I have project full of ICO type images and I want it to be inside the compiled executable rather than installed file in program file to protect any modification by users.

I found Zedna UDF is a great solution, I downloaded the ResourcesEX but I still cannot understand how it work through the example there.

Can any one show me a simple example how add  image (image.ico) to be loaded from resources using Zedna resources and function ?

I can deploy the example in my script for all the pictures included.

;Pictures in the script example : 
;After instalation, a floder containinng Assest is created in Program file to load pictures. 

$SettingIco = GUICtrlCreateIcon("C:\Program Files (x86)\My Software File\setting.ico", -1, 155, 55, 100, 100)
$LockerIco = GUICtrlCreateIcon("C:\Program Files (x86)\My Software File\loker.ico", -1, 345, 50, 120, 120)

;Loading the above from Executable will protect any form of modificaction and property rights

Thank you in advance.

Link to comment
Share on other sites

  • Developers

Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

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

You do not need to use any UDF if you just want to add icons here and there in your GUI script.

Just add your .ico file with wrapper :

#AutoIt3Wrapper_Res_Icon_Add=Start.ico,151
#AutoIt3Wrapper_Res_Icon_Add=Stop.ico,152

Then access the ressources like this :

$Button1 = GUICtrlCreateButton("Button1", 16, 72, 127, 105, $BS_ICON)
GUICtrlSetImage(-1, @AutoItExe, 151)
$Button2 = GUICtrlCreateButton("Button2", 168, 72, 127, 105, $BS_ICON)
GUICtrlSetImage(-1, @AutoItExe, 152)

Remember that in order to show the .ico, you need to compile your script !

Additional info : if you do not specify any number in wrapper, it is starting at 201.  To create an icon control, you can use this :

GUICtrlCreateIcon(@AutoItExe, 201, 308, 28, 16, 16)

 

Edited by Nine
Link to comment
Share on other sites

  • Developers

You shouldn't need reshacker, but do need the full scite4autoit3 installer.

Edited by Jos

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

Hi Jos,

I downloaded the latest version of scite4autoit3 (full Adds-on) but it does not work with installing the Reshaker.

Meanwhile, is it possible to insert exe inside the main executable script ?

Assuming this Software component like below :

1. Main Exe

2. 2 Exe to be called by Main Exe

3. Dll File to support main Exe an other Exe for main installation folder

How to include all (2) & (3)  inside the main EXE (TO be compiled )  using ZEDNA or other approach ?

thanks

Link to comment
Share on other sites

  • Developers
34 minutes ago, mikestern said:

I downloaded the latest version of scite4autoit3 (full Adds-on) but it does not work with installing the Reshaker.

No idea what you mean here, but AutoIt3Wrapper.au3 is not using reshacker to add recourses to the PE Header. 
Post your source code that you test with so we can see what you are doing. 

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

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