Jump to content

Is it possible to change the icon on the title bar of a window?


4Eyes
 Share

Recommended Posts

  • Moderators

4Eyes,

Just specify an icon when you compile the script. Then Windows associates that icon with your .exe and you will see it on the title bar.

You can choose the icon when the Aut2Exe compile window appears or, if you use the full SciTE package, you can add this directive in your script:

#AutoIt3Wrapper_icon="icon_path"

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

4Eyes,

Just specify an icon when you compile the script. Then Windows associates that icon with your .exe and you will see it on the title bar.

You can choose the icon when the Aut2Exe compile window appears or, if you use the full SciTE package, you can add this directive in your script:

#AutoIt3Wrapper_icon="icon_path"

M23

Melba23,

It's that simple? You may be able to tell I'm relatively new to AutoIt but I absolutely love it.

Thanks heaps for that info.

Regards,

4Eyes

Link to comment
Share on other sites

4Eyes,

Just specify an icon when you compile the script. Then Windows associates that icon with your .exe and you will see it on the title bar.

You can choose the icon when the Aut2Exe compile window appears or, if you use the full SciTE package, you can add this directive in your script:

#AutoIt3Wrapper_icon="icon_path"

M23

Melba23,

I use the SciTE compile option. I added that directive in the script and it didn't change the icon. Is there something I should have #include (d)?

Regards,

4Eyes

Link to comment
Share on other sites

The first resource is -5, then decremented -6, -7 etc.. ^^

Um, ok.

Psst.... what did he say?

I'll try it at home where I have more time and resources. Thanks for help. It'd be even better if I knew what you meant. I see many noob's like me asking similar questions. Wrapper this, wrapper that. "Read the whole 18 pages of the thread" etc. That's great but it's truly doing more head in.

Ta muchly just the same..... grrr... more reading... head filling up....

4Eyes

Link to comment
Share on other sites

  • Moderators

4Eyes,

I am surprised that you could not get #AutoIt3Wrapper_icon="icon_path" to work - works for me every time. :-)

An explanation of Authenticity's "-5" comment. If you use #AutoIt3Wrapper_Res_Icon_Add you are adding icons to the default AutoIt icons. The way to define resource icons is by a negative index (just do not ask me why!), so using -5 will use the first of the additional icons, -6 the second etc.

I hope that is clear(er).

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

4Eyes,

I am surprised that you could not get #AutoIt3Wrapper_icon="icon_path" to work - works for me every time. :-)

An explanation of Authenticity's "-5" comment. If you use #AutoIt3Wrapper_Res_Icon_Add you are adding icons to the default AutoIt icons. The way to define resource icons is by a negative index (just do not ask me why!), so using -5 will use the first of the additional icons, -6 the second etc.

I hope that is clear(er).

M23

Mate, it's as clear as mud. I think (it was yesterday... seems so long ago with so little sleep lately) that I got it working without actually understanding why.

If I'd started with the full SciTe package instead of the smaller version that is in the AutoIT download then maybe this would be clearer. As I scan thru topics here I see this is a very common issue. Noob's get the simpler package and then ask questions that can only be answered by referring to stuff that we haven't seen or used. This is in no way a criticism of AutoIt or the support here at all. The support is really very good. It's just my observation.

Quite frankly, my head is full and I just haven't go the stomach to read thru 18 pages of posts, at the moment at least. I will though. I don't expect you or anybody else to hold my hand. Hope you can see where I'm coming from. A tute on using the 'full' package as you do M23 would be awesome. I've seen many of your posts and it's quite clear that you in particlar really know your way around AutoIT and the add-ons.

I've got 2 projects under way. One that may earn me some $$$ and another that probably won't but it's a pet of mine. I work as a computer tech and have written some ute's that help in my day to day work. The first was written in VB and the second (as yet not quite complete) has been translated into AutoIt from VB. That was a good learning experience. So you can see I'm dead keen (ok, I'll admit I'm quite compulsive and AutoIT is the current compulsion). I LERV cutting code as it gives me a real buzz to fix anything and cutting code ... seeing an idea come to fruition off the end of my fingertips is the biggest buzz of all. What I'm trying to say in way too many words is that I'm keen to learn but have a lot on my plate. Your interest and help is VERY appreciated. By the same token, I'll try not to outdo my welcome. :D

Now to find the right forum section to ask about ini files... [Edit] Now know the functions to look for in the help. Strange... I'm sure I searched for the word ini.

Thanks heaps,

4Eyes

Edited by 4Eyes
Link to comment
Share on other sites

Actually if you just use the AutoIt compiler then you can select the icon to use and that will become the default icon for the compiled script. In that case there is no need to specify the icon in your code. Running it as a script, the icon will be the default AutoIt icon though.

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!"

Link to comment
Share on other sites

Actually if you just use the AutoIt compiler then you can select the icon to use and that will become the default icon for the compiled script. In that case there is no need to specify the icon in your code. Running it as a script, the icon will be the default AutoIt icon though.

I think you must be referring to the 'full' AutoIT/SciTe package as distinct from the installer that most noob's like myself use. Otherwise I not of what you speak, but thanks.

Regards,

4Eyes

Link to comment
Share on other sites

I think you must be referring to the 'full' AutoIT/SciTe package as distinct from the installer that most noob's like myself use. Otherwise I not of what you speak, but thanks.

Regards,

4Eyes

The AutoIt compiler is located in the AutoIt3\Aut2Exe folder. You will find a file named Aut2Exe.exe which is the actual AutoIt compiler. If you run the file, you will quickly see that of which I speak.

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!"

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