Jump to content

TrayItem ContecxtMenu


Recommended Posts

Hello All,

I need a solution for the following problem:

Open a context menu by right click on a trayitem (tray in tray).

The base problem is to seperate the mouseclick events.

Any ideas ?

Regards

Additional info: The tray creation based on a privat udf like modernmenuraw.au3

Link to comment
Share on other sites

Example from helpfile for TraySetClick():

#Include <Constants.au3>
#NoTrayIcon

Opt("TrayMenuMode",1)  
 ; Default tray menu items (Script Paused/Exit) will not be shown.

$settingsitem  = TrayCreateMenu("Settings")
$displayitem    = TrayCreateItem("Display", $settingsitem)
$printeritem    = TrayCreateItem("Printer", $settingsitem)
TrayCreateItem("")
$aboutitem      = TrayCreateItem("About")
TrayCreateItem("")
$exititem       = TrayCreateItem("Exit")

TraySetState()
TraySetClick(16)

While 1
    $msg = TrayGetMsg()
    
Select
        Case $msg = 0
            ContinueLoop
        Case $msg = $aboutitem
            Msgbox(64,"about:","AutoIt3-Tray-sample")
  
      Case $msg = $exititem
            
ExitLoop
    EndSelect
WEnd

Exit
Edited by Zedna
Link to comment
Share on other sites

Example from helpfile for TraySetClick():

....

First - thanks for the quikly reply.

But this is not what I mean. I explain it on your example:

1. Run the script

2. Click on the tray with the right mouse button to open the tray

3. Select the trayitem "About"

4. Then I would like to click the right button again to open a new tray as a context menu (not as submenu) !!

That's my problem.

Regards

Edited by Amtsknecht
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...