Jump to content
Sign in to follow this  

TrayMenu Problem

Recommended Posts

Hi guys

I made a nice Program that has a nice TrayMenu in it.

The only problem i've got is to Start a Program when the TrayIcon is double clicked. I didn't find something to solve that problem in the Help file. Is there a way to do this? (I need this to simulate an Application and it openes when the TrayIcon is double clicked)




I see there's a way to do it with


but then i need to rewrite the whole "TrayGetMsg()" Stuff :\

Is there another way?

Edited by XxXFaNtA

Share this post

Link to post
Share on other sites

Okay..this works lol..sry :D

Thanks :-*

No problem, I noted it was a pain until I changed the TrayMenuMode to 5.

#include <constants.au3>
Opt('TrayMenuMode', 5)
$Menu = TrayCreateItem('SomeText')
$Exit = TrayCreateItem('Exit')

While 1
    $TrayMsg = TrayGetMsg()
    If $TrayMsg <> 0 Then ConsoleWrite($TrayMsg)
    If $TrayMsg = - 13 Then
        MsgBox(64, 'Info:', 'Double Clicked')
    If $TrayMsg = $Exit Then Exit

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post

Link to post
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
Sign in to follow this  

  • Create New...