XxXFaNtA Posted July 15, 2006 Share Posted July 15, 2006 (edited) 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) Thanks, FaNtA Edit: I see there's a way to do it with TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE,"StartProg") but then i need to rewrite the whole "TrayGetMsg()" Stuff :\ Is there another way? Edited July 15, 2006 by XxXFaNtA /[center][/center] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 15, 2006 Moderators Share Posted July 15, 2006 And $TrayMsg = TrayGetMsg() If $TrayMsg = $TRAY_EVENT_PRIMARYDOUBLE Then StartProg()Doesn't work? 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. Link to comment Share on other sites More sharing options...
XxXFaNtA Posted July 15, 2006 Author Share Posted July 15, 2006 Okay..this works lol..sry Thanks :-* /[center][/center] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 15, 2006 Moderators Share Posted July 15, 2006 Okay..this works lol..sry 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') EndIf If $TrayMsg = $Exit Then Exit Sleep(10) WEnd 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. Link to comment Share on other sites More sharing options...
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