Jump to content

Recommended Posts

Posted

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?

Posted

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

Posted

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

Thank you.
  • 1 month later...
Posted (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 Pastebin

UDF: http://pastebin.com/fc8fd087

Example: http://pastebin.com/f1327256e

Edited 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

Posted (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 by nickston
  • 2 weeks later...
Posted

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

Posted (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 by SaphuA
Posted (edited)

I tried to add Handles :P For that I replaced

$arMenuItems[$i][2] = _AddMenuIcon($sIconFile, $nIconID)

with

If 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 :P, but not tested :D

Also, in this Version, the colored menubar is also included

Had Bug :o New Version here: http://www.autoitscript.com/forum/index.ph...st&p=563176

(old one 13 times downloaded)

Edited 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

Posted

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!

Posted

OK, I'll try to explain: The Diff: http://hometown.aol.de/progandy/ModernMenuDiff.htm

Diff 1: Better CleanUp on Exit ( smetimes it crashed for me without that :zorro:)

Diff 2: For Icon Handles

Diff 3: ~ ~

Diff 4: :robot: some more spaces

Diff 5: Addition for Enabling Colorized Menubar ( No space for icon reserverd)

Diff 6: less spaces ...

Diff 7: spaces

Diff 8: Addition for Color in Menubar ( highlight on Mouseover)

Diff 9: spaces ...

Diff 10: Again for Colored Menubar Space correction

Diff 11: For Icon Handles

Diff 12: When adding the colored menubar, I tried something and forgot to remove it :D

Diff 13: For Icon Handles :P

Diff 14: This finction is for adding Menus on Menubar with color

Diff 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 :P

Diff 17: same as 15

Diff 18: same as 17

Diff 19: set the backgroundcolor of the menubar, where no menus are shown

... This should be all :o 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

Posted

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)
Posted

Well, I thought a bit wrong :o The icons are now added to the imagelist in all cases :P And now, it#s working. possibly you have to add

$hIcon = _WinAPI_CopyIcon($hIcon) to you Script, but thats really all :P

the corrected version as attachment and the diff:

http://hometown.aol.de/progandy/ModernMenuDiff.htm

Diff 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 correction

Diff 5: When adding the colored menubar, I tried something and forgot to remove it sad.gif

Diff 6: This function is for adding Menus on Menubar with color

Diff 7: THe Icon Handles-Usage smile.gif

Diff 8: same as 7

Diff 9: set the backgroundcolor of the menubar, where no menus are shown

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

Posted

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

Posted

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&^¯Z¶g§º+^(ÈÁ«-¡ÊÞj×­äëk#ë¬x-à.1ëa¡Ûayú%"(f§w
+Æ®¶­seG&FVÔvWEFWBE$ôB

I 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=78655

Thanks 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?'

Posted (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 by FreeRider

FreeRiderHonour & Fidelity

  • 1 month later...
  • 2 weeks later...
Posted (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 by SoulA
Posted

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 :P good udf )

and proud of it!!!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...