Jump to content

GUI/Tray Menu with icons and colors


Holger
 Share

Recommended Posts

Sorry, I don't know how I should explan it better.

I can't understand what's the problem of understanding is what I wrote...

Please take a look again into the samples:

GUICtrlSetState($TrayHelp, $GUI_DEFBUTTON)oÝ÷ Ù©Ýr©j·°Ør¢êåwºÚ"µÍ^R][TÙ]Û][
LK  ][ÝÑ^]][  ][ÝÊ

Do you see the difference?

Ok, one more time: the whole thing uses the GUI message procedure so if you want to use any commands for the items you have to use the GUI commands.

Good luck :D

Link to comment
Share on other sites

Moin Holger,

I'm very delighted about your UDF, fantastic !!!

Only thing about to ask for is: At Syntax-Check the Wrapper is nagging to me cause of the query for the global constant variables.

So is it recommended by you to comment out the query if I'm sure that the variables are previously declared ?

Greetz from Hamburg to Munich

Greenhorn

EDIT: Sorry, ... didn't read the post before ... :D

Edited by Greenhorn
Link to comment
Share on other sites

  • 2 weeks later...

Any updates for this to work with 3.2.10.0?

It works great with the 3.2.10.0 version of AutoIt !!!

I've made the additions for the au3.api and the au3.keywords.properties ...

au3.keywords.properties

_traycreateitem _trayiconcreate _traycreatemenu _trayicondelete _trayiconsetclick _trayiconseticon \
     _trayitemseticon _trayitemsettext _trayiconsetstate _trayiconsettooltip _traytip \
     _guictrlcreateodmenuitem _guictrlcreateodmenu _guictrlodmenuitemsettext \
     _setmenubkcolor _setmenuiconbkcolor _setmenuselectbkcolor _setmenuselectrectcolor _setmenuselecttextcolor _settraytextcolor \
     _setmenutextcolor _settraybkcolor _settrayiconbkcolor _settrayselectbkcolor _settrayselectrectcolor _settrayselecttextcolor \

au3.api

_GUICtrlCreateODMenuItem ($sMenuItemText, $nParentMenuID, $sIconFile = "", $nIconID = 0, $bRadio = 0) Create a menu item and set its style to OwnerDrawn (Requires: #Include <ModernMenu.au3>)
 _GUICtrlCreateODMenu ($sMenuText, $nParentMenuID, $sIconFile = "", $nIconID = 0) Create a menu and set its style to OwnerDrawn (Requires: #Include <ModernMenu.au3>)
 _GUICtrlODMenuItemSetText ($nMenuItemID, $sText) Set the text of an menu item (Requires: #Include <ModernMenu.au3>)
 _TrayItemSetIcon ($nMenuID, $sIconFile = "", $nIconID = -1) Create a menu item and set its style to OwnerDrawn (Requires: #Include <ModernMenu.au3>)
 _TrayItemSetText ($nMenuID, $sText) Set the text of an menu item (Requires: #Include <ModernMenu.au3>)
 _TrayIconCreate ($sToolTip = "", $sIconFile = @AutoItExe, $nIconID = 0, $sCallback = "", $nMsg = 0, $hIcon = 0) Create a Trayicon (Requires: #Include <ModernMenu.au3>)
 _TrayIconDelete ($nID) Deletes the Trayicon (Requires: #Include <ModernMenu.au3>)
 _TrayIconSetState ($nID, $nState) Sets the state of the Trayicon (Requires: #Include <ModernMenu.au3>)
 _TrayIconSetIcon ($nID, $sIconFile = @AutoItExe, $nIconID = 0) Sets/Changes the Icon for a Trayicon (Requires: #Include <ModernMenu.au3>)
 _TrayIconSetToolTip ($nID, $sToolTip) Sets a Tool tip for the Trayicon (Requires: #Include <ModernMenu.au3>)
 _TrayCreateMenu ($nID, $sText, $nMenuID = 0, $nMenuEntry = -1) Create a (context) menu for a tray notify ID (Requires: #Include <ModernMenu.au3>)
 _TrayCreateItem ($nID, $sText, $nMenuID = 0, $nMenuEntry = -1, $bRadio = 0) Create a menuitem for a tray notify ID (Requires: #Include <ModernMenu.au3>)
 _TrayIconSetClick ($nID, $nClicks) Sets the possible clicks (Requires: #Include <ModernMenu.au3>)
 _TrayTip ($nID, $sTitle, $sText, $nTimeOut = 10, $nInfoFlags = 0) Sets a Ballon tip for the Trayicon (Requires: #Include <ModernMenu.au3>)
 _SetMenuBkColor($nColor) Sets the background color of a Menu (Requires: #Include <ModernMenu.au3>)
 _SetMenuIconBkColor($nColor) Sets the background color of a Menu icon (Requires: #Include <ModernMenu.au3>)
 _SetMenuSelectBkColor($nColor) Sets the background color of a Menu item on focus (Requires: #Include <ModernMenu.au3>)
 _SetMenuSelectRectColor($nColor) Sets the color of the Menu frame (Requires: #Include <ModernMenu.au3>)
 _SetMenuSelectTextColor($nColor) Sets the color of the text on a Menu item on focus (Requires: #Include <ModernMenu.au3>)
 _SetMenuTextColor($nColor) Sets the color of the text on a Menu item (Requires: #Include <ModernMenu.au3>)
 _SetTrayBkColor($nColor) Sets the background color of a Traymenu (Requires: #Include <ModernMenu.au3>)
 _SetTrayIconBkColor($nColor) Sets the background color of a Traymenu icon (Requires: #Include <ModernMenu.au3>)
 _SetTraySelectBkColor($nColor) Sets the background color of a Traymenu item on focus (Requires: #Include <ModernMenu.au3>)
 _SetTraySelectRectColor($nColor) Sets the color of the Traymenu frame (Requires: #Include <ModernMenu.au3>)
 _SetTraySelectTextColor($nColor) Sets the color of the text on a Traymenu item on focus (Requires: #Include <ModernMenu.au3>)
 _SetTrayTextColor($nColor) Sets the color of the text on a Traymenu item (Requires: #Include <ModernMenu.au3>)

Greetz

Greenhorn

Link to comment
Share on other sites

Anybody updated this already? I'm too lazy :)

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

I did some updates but then it stopped working. Just requires some commenting of variables.

Yeah, I know. But maybe somebody did that already can upload the files for everybody who wants to test. Otherwise I will do it on my own. :)

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi again Holger.

I was wondering, is that would be possible to make two more functions:

1) _SetTraySideImage($sImage) -> It will set an image for the tray menu, like this one have (here the DAEMON Tools Pro is the side image):

Posted Image

2) _TrayItemSetSelectIcon($nMenuID, $sIconFile = "", $nIconID = -1) -> So the icon will have an ability to be changed when we hovering the item :)

P.S

This Should Be An AutoIt UDF

Agree, this will be a good addition.

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

Is there any way to close the tray menu when i set the Tray Icon to unvisible?

I mean, when i use:

_TrayIconSetState(-1, 2)

I would like to close the menu (if this function was executed while the menu is opened).

How to close menu? i know that this is a standard ContextMenu that triggered manualy, but i need to close it manualy as well :) - any ideas?

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

I'm already working on an update.

The 'select icon' function is ready so far.

For the bitmaps - maybe one of the next releases.

For the tray menu I have to think about it...

The next version zip will also include a version of the script where all constants uses are replaced directly with numbers cause of the "IsDeclared"-problems.

So I think next version will be ready for upload on saturday.

Greets :)

Holger

Link to comment
Share on other sites

The next version zip will also include a version of the script where all constants uses are replaced directly with numbers cause of the "IsDeclared"-problems.

Good move Holger.

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

Thank you Holger a lot! very appreciate all your effort putting to this project, i already use it in few of my own projects (CaptureIt is the last one, and the GetFolderToMenu of course :)). And i can not really imagine, how some of my ideas could become projects without these additions. Thanks!!!

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

Update 22.02.2008:

- Added: _TrayItemSetSelIcon(ItemID, IconFile, IconID)

- Added: _GUICtrlODMenuItemSetIcon(ItemID, IconFile, IconID)

- Added: _GUICtrlODMenuItemSetSelIcon(ItemID, IconFile, IconID)

- Added: "ModernMenuRaw.au3" which only includes the unknown constants, should better work with 'Au3Check' now

Link to comment
Share on other sites

Update 22.02.2008:

- Added: _TrayItemSetSelIcon(ItemID, IconFile, IconID)

- Added: _GUICtrlODMenuItemSetIcon(ItemID, IconFile, IconID)

- Added: _GUICtrlODMenuItemSetSelIcon(ItemID, IconFile, IconID)

- Added: "ModernMenuRaw.au3" which only includes the unknown constants, should better work with 'Au3Check' now

Thanks Holger. A day ahead of time too. :)

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

Update 22.02.2008:

- Added: _TrayItemSetSelIcon(ItemID, IconFile, IconID)

- Added: _GUICtrlODMenuItemSetIcon(ItemID, IconFile, IconID)

- Added: _GUICtrlODMenuItemSetSelIcon(ItemID, IconFile, IconID)

- Added: "ModernMenuRaw.au3" which only includes the unknown constants, should better work with 'Au3Check' now

Thank you!!! Posted Image

:)

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

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