Jump to content
Sign in to follow this  
Armand

Embedding Icons Into AU3 Script!

Recommended Posts

Armand

hey there!

i'm trying to add some resources to my file but it seems like i'm doing something wrong )-:

- i'm compiling the script without upx compression

- then opening it with Resource Hacker and adding 3 ICONS with names: 200|201|202

- then just to make sure i'm opening the file with icon viewing program (from koda) and make sure all the files are there and they are! right after AU3s default 3 icons! situated at locations 3|4|5.

post-4528-1177020135_thumb.jpg

- now when i run the script it seems like the icons are not loading propperly becouse the controls are abscent! i'm using these lines inside the script to create the ICON-CONTROLS:

If @Compiled = 1 Then
    $RemAddress = GUICtrlCreateIcon(@ScriptFullPath, 1, 416, 288, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
Else
    $RemAddress = GUICtrlCreateIcon(@ScriptDir&"\spam.ico", 0, 416, 288, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
EndIf

can anyone spot any mistake or maybe suggest anything ?!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites
evilertoaster

Are you actually writing the Icon Files out to the hard drive and then using them from there? You could do a fileInstall() is so.

I'm pretty sure there can be some issues often with embedding things into autoit exe (like with resource hacker) simply becuase of the dynamic nature of the file (self modifying ect)... somthing to consider...

Share this post


Link to post
Share on other sites
Armand

Are you actually writing the Icon Files out to the hard drive and then using them from there? You could do a fileInstall() is so.

I'm pretty sure there can be some issues often with embedding things into autoit exe (like with resource hacker) simply becuase of the dynamic nature of the file (self modifying ect)... somthing to consider...

- dude FileInstall(), i hate him! looking too damn noobish!

- you can embed files freely! the only thing wrong is that it seems like i can't use the embedded icons from the script...


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites
Zedna

Look here at my post about adding icons to resources.

I think your problem is in using GUICtrlCreateIcon()

I successfully used GUICtrlSetImage() on previously created controls.

So try to create controls first and then apply icons to them by GUICtrlSetImage()

EDIT: also try to use negative numbers as icons numbers due to changes in Autoit icons handling since I posted this my old example

EDIT2: Autoit change was in implementing using also icon names (inside resources) and not only icon indexes so for backward compatibility in definition of parametres with icon index there must be icon indexes negative numbers - see GUICtrlSetImage() in Helpfile

EDIT3: As I said GUICtrlCreateIcon() must have external file (not from resources) but it's icon can be changed then by GUICtrlSetImage() as I proposed --> indexes with negative 1-based index

Edited by Zedna

Share this post


Link to post
Share on other sites
Armand

If @Compiled = 1 Then 
    $AddAddress = GUICtrlCreateIcon(@ScriptFullPath, -4, 384, 292, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP,$BS_ICON))
Else
    $AddAddress = GUICtrlCreateIcon(@ScriptDir&"\aoperz.ico", 0, 384, 292, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP,$BS_ICON))
EndIf

-> Working propperly (-:

__________

THANKS FOR ALL THE HELP !!!!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

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  

×