nickston Posted June 7, 2008 Posted June 7, 2008 I just have to add again the tray stuff for testing then it will be published maybe on sunday.Edit: forgot to say that I will seperate the menu and tray stuff (sometimes you want additional tray stuff but don't need menu icons...)Hi, again.Separate the menu and tray is good news. (i'm need only tray )And I again have some questions for you.1) How about support 3.2.12.0?2) Why you removed nID from _TrayCreateItem? It's reduce functional of that. For example, I create the first Tray _TrayIconCreate and add some items, after create the second Tray, and then i wish add items again to first tray. How?
Holger Posted June 7, 2008 Author Posted June 7, 2008 Hi nickston it needs a little bit more time (busy at the moment). To your questions: 1.) works with 3.2.12.0 If you get some error messages (if you use Au3Chk) ignore that or delete the constants from the menu files. 2.) you have to create a contextmenu -> search for "_TrayCreateContextMenu" So if you create an icon you have to use it like: $TrayMenu2 = _TrayCreateContextMenu($TrayIcon2) And the create the menu items in this contextmenu - similar to "GUICtrlCreateContextMenu()". Greets Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
nickston Posted June 7, 2008 Posted June 7, 2008 it needs a little bit more time (busy at the moment).To your questions:1.) works with 3.2.12.0If you get some error messages (if you use Au3Chk) ignore that or delete the constants from the menu files.2.) you have to create a contextmenu -> search for "_TrayCreateContextMenu"So if you create an icon you have to use it like:$TrayMenu2 = _TrayCreateContextMenu($TrayIcon2)And the create the menu items in this contextmenu - similar to "GUICtrlCreateContextMenu()".GreetsHolgerThank you.
ProgAndy Posted July 18, 2008 Posted July 18, 2008 (edited) I played a bit with my copy of the UDF and figured out how to make a colored menubar muttley... I can't upload it, because it's too big Ok, now PastebinUDF: http://pastebin.com/fc8fd087Example: http://pastebin.com/f1327256e Edited July 18, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
nickston Posted July 21, 2008 Posted July 21, 2008 (edited) Hi, Holger. I have some one question it's may be a trouble. I create Tray in my app, but don't create main window. Then I start app It's closing. I detect what for Tray sending messages with TrayItemId of item which was created last. In my way this item is Exit. This behaviour of Tray rise in last TrayModernMenu It's mistic. I have two app which have same script text, but in first app all work, and on second have trouble (see up). It's trouble not depends of Modern Menu, its trouble of compiler autoit-v3.2.12.1 . Edited July 22, 2008 by nickston
igorm Posted August 3, 2008 Posted August 3, 2008 Hi, Is it possible to somehow use this code to add icons to tab items? Cheers Office 2000/XP/2003/2007 Slipstreamer
ProgAndy Posted August 4, 2008 Posted August 4, 2008 You don't need this UDF. For images in tabs, look at the example of _GUICtrlTab_GetItem *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
SaphuA Posted August 4, 2008 Posted August 4, 2008 (edited) Hi there, Very nice script indeed! Although I am missing one feature: it isn't possible to use a pointer to set an icon for the menu items. Could you please add this feature or guide me a little and help me add it myself? Thanks! Edited August 4, 2008 by SaphuA http://www.saphua.com/
ProgAndy Posted August 5, 2008 Posted August 5, 2008 (edited) I tried to add Handles For that I replaced $arMenuItems[$i][2] = _AddMenuIcon($sIconFile, $nIconID)withIf IsHWnd($sIconFile) Or Number($sIconFile)>0 Then $arMenuItems[$i][2] = HWnd($sIconFile) Else $arMenuItems[$i][2] = _AddMenuIcon($sIconFile, $nIconID) EndIf--> Use Handle instead of filename , but not tested Also, in this Version, the colored menubar is also includedHad Bug New Version here: http://www.autoitscript.com/forum/index.ph...st&p=563176(old one 13 times downloaded) Edited August 8, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
SaphuA Posted August 5, 2008 Posted August 5, 2008 Ahh, cool, I will check it out somewhere tonight. Thanks! What else did you change in your file, and why? I ran a little diff on your ModernMenuRaw vs the one provided in the first post, and there are quite some differences. Mind to clarify a little on that? Thanks again! http://www.saphua.com/
ProgAndy Posted August 5, 2008 Posted August 5, 2008 OK, I'll try to explain: The Diff: http://hometown.aol.de/progandy/ModernMenuDiff.htmDiff 1: Better CleanUp on Exit ( smetimes it crashed for me without that )Diff 2: For Icon HandlesDiff 3: ~ ~Diff 4: some more spacesDiff 5: Addition for Enabling Colorized Menubar ( No space for icon reserverd)Diff 6: less spaces ...Diff 7: spacesDiff 8: Addition for Color in Menubar ( highlight on Mouseover)Diff 9: spaces ...Diff 10: Again for Colored Menubar Space correctionDiff 11: For Icon HandlesDiff 12: When adding the colored menubar, I tried something and forgot to remove it Diff 13: For Icon Handles Diff 14: This finction is for adding Menus on Menubar with colorDiff 15: If you set a new icon, should the old one be deleted? ( if setting handles, this could not be useful) Diff 16: THe Icon hanldes-Usage Diff 17: same as 15Diff 18: same as 17Diff 19: set the backgroundcolor of the menubar, where no menus are shown... This should be all I didn't change the removing of the Icons when deleting a Menuitem. I think, in these functions you should add an option like in Diff 15/16, too. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
SaphuA Posted August 5, 2008 Posted August 5, 2008 Thanks for your reply! I didn't get the last part about deleting menu items though. Anywho, I tested your version but the menu icon doesn't work. Here's the code I used: Run("notepad.exe", "", @SW_MINIMIZE) WinWait("[Class:Notepad]") $hNotepad = WinGetHandle("[Class:Notepad]") $hIcon = DllCall("user32.dll", "int", "GetClassLong", "hwnd", $hNotepad, "int", $GCL_HICON) $hIcon = $hIcon[0] If $hIcon = 0 Then $hIcon = DllCall("user32.dll", "int", "GetClassLong", "hwnd", $hNotepad, "int", $GCL_HICONSM) $hIcon = $hIcon[0] EndIf $trayIcon = _TrayIconCreate("Minime", "shell32.dll", -13) _TrayIconSetState() $trayMenu = _TrayCreateContextMenu() $TrayExit = _TrayCreateItem("Exit") _TrayItemSetIcon($TrayExit, $hIcon) http://www.saphua.com/
ProgAndy Posted August 8, 2008 Posted August 8, 2008 Well, I thought a bit wrong The icons are now added to the imagelist in all cases And now, it#s working. possibly you have to add $hIcon = _WinAPI_CopyIcon($hIcon) to you Script, but thats really all the corrected version as attachment and the diff:http://hometown.aol.de/progandy/ModernMenuDiff.htmDiff 1: Better CleanUp on Exit ( smetimes it crashed for me without that biggrin.gif)Diff 2: Addition for Enabling Colorized Menubar ( No space for icon reserverd)Diff 3: Addition for Color in Menubar ( highlight on Mouseover)Diff 4: Again for Colored Menubar Space correctionDiff 5: When adding the colored menubar, I tried something and forgot to remove it sad.gifDiff 6: This function is for adding Menus on Menubar with colorDiff 7: THe Icon Handles-Usage smile.gifDiff 8: same as 7Diff 9: set the backgroundcolor of the menubar, where no menus are shownModernMenuRaw.au3 *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
Felix Posted August 14, 2008 Posted August 14, 2008 Hi, I got the traymenu working in a non-skinned gui. I Was wondering if it's possible to combine the traymenu of Modern Menu Lib with EzSkin (modified by JScript). I'm trying, but not succesful yet. Both a are awesome projects. Great work what these guys do. Did anyone else try this yet? John
PlayZoneUK Posted August 21, 2008 Posted August 21, 2008 Good afternoon,I've been playing about with adding icons to my Application Launcher Tray Menu good job by the way!However Ive run into a brick wall.Background:The information on how many buttons / items there are on the GUI / Tray Menu is retrieved from a config file. Therefore Ive used GUICtrlSetOnEvent(-1, "RunApplication")oÝ÷ Û¥¥úè©è¶«ºÇ«¶îhiû§rب¶êí©áj·¡Ø§Ø^jeÆì{h¶¬r¸©µ8^Ë.x¡jø§+0éȺÇëçîËb¢wè®Ø^N¶²1éîÂë²Ø^~e£§Êy«¢+ÙÕ¥ÑɱɡU%} Ñɱ%oÝ÷ ÚØ^©¡ûazg§º+^Ú²{Z¦®Ú)jËh½êí¢Ø^~éܶ*'NnÞÂä±ú+¶Pî·^+¢g¬¶ay:ÚÈǧ»'(Èë-ën®{½©nzúòz&jÛ^¯Z¶g§º+^%É(ÈÁ«-¡ÊÞj×äëk#ë¬x-à.¶1ëa¡Ûayú%"(f§w +Æ®¶seG&FVÔvWEFWBE$ôBI dont want to go to the AutoIT method, because I like the idea of having icons displayed next to the applications.Are there any plans to add this functionality into the script? e.g. TrayItemGetText(@TRAY_ID)Does any one have any ideas?... I would be very grateful If you want to see my code its listed here:http://www.autoitscript.com/forum/index.php?showtopic=78655Thanks in advance for any help. Words of Wisdom and Favourite Quotes: 'Nothing is impossible, despite what other people say and think, prove them wrong and show them what you can do!' 'Understanding is a three edged sword, your side, their side and the truth!' 'The truth that humanity has never been able to grasp, is that death may be the only absolute freedom there is!' 'I've run out of places to put the brush... what do you suggest?'
FreeRider Posted August 26, 2008 Posted August 26, 2008 (edited) Hello Holger, First of all... GOOD JOB !!! The functions are very useful. However I'm trying to work with using the TrayEventMode set to 1 and I have difficulties to get the text of the Clicked Item. As the standard TrayCreateItem() function is not used I cannot perform a TrayItemGetText(). The problem is I Have an undefinied number of applications listed in an ini file (on application = one section with several items), therefore this produce a variable number of items in the tray menu (logical). The only way for me to run the appropriate application is to get the name from the control (last clicked tray item) and compare it to the name I've stored in the ini file. Would it be possible for you to include such function ?... or maybe have you already the answer to my question. Thanks for your help. FreeRider **** CANCEL THE ABOVE REQUEST ***** I found the way to get text of a control (_GetMenuText)... PlayZoneUK who's also asked for the same function is also alerted... So just our question. Edited August 27, 2008 by FreeRider FreeRiderHonour & Fidelity
Sunaj Posted October 11, 2008 Posted October 11, 2008 (edited) @Holger, Since you are de facto expert on "Owner Drawn context menues vs. AutoIt" I was wondering if you have any idea(s) on how to draw an input/text area inside a context menu? (or indeed whether it is even possible!) Best, Sunaj Edited October 11, 2008 by Sunaj [list=1][*]Generic way to detect full path to default browser, List/ListView Events Using GuiRegisterMsg (detect doubleclick and much more)[*]Using dllcall for full control over fileopendialog, Make DirMove act somewhat normally (by circumventing it...)[*]Avoid problems with "&" (chr(38)) in code, Change desktop maximized area/workspace (fx to make deskbar type app)[*]Change focus behavior when buttons are clicked to work closer to 'standard windows' app[*](Context) Menus With Timed Tooltips, Fast Loops & Operators in AU3[*]Clipboard UDF, A clipboard change notification udf[/list]
SoulA Posted October 24, 2008 Posted October 24, 2008 (edited) Whenever I do GUICtrlSetDefBkColor(0xB9D1EA) with my GUI all of my buttons dissappear if I have ModerMenuRaw.au3 included. How can I prevent this? EDIT: It is actually anytime I set the background color for a button. Other things work but not buttons. They will disappear. Any ideas how to fix this please? Edited October 24, 2008 by SoulA
damian666 Posted October 24, 2008 Posted October 24, 2008 ok, so i am really stumped by this... maybe i am just off today, or its just above my head... could anyone please provide a simple script, with just 2 trayitems with icons? thats all i need, the given samples error up for some reason... and are just way to big to get my head around atm... thanx in advance guys Damian666 p.s., screenshots look sexy man good udf ) and proud of it!!!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now