Sypher Posted February 12, 2007 Posted February 12, 2007 (edited) Hey, In a script i am using a traymenu with 2 items, seperated with a.. seperator. #NoTrayIcon #include <Constants.au3> <snip> Opt("TrayAutoPause", 0) Opt("RunErrorsFatal", 0) Opt("TrayMenuMode", 1) Opt("TrayOnEventMode",1) <snip> TrayItemSetOnEvent(TrayCreateItem("Start"), "_Start") TrayCreateItem("") TrayItemSetOnEvent(TrayCreateItem("Stop"), "_Stop") TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "_Start") TraySetState() When i'm running it under SciTE, it works great. Left click, right click, double click. But when its compiled (under beta or stable, doesn't matter) the right- nor leftclick works! Only the doubleclicking works. I've seen this on a few computers i've tested it on, but on my own it's working.. The code should be ok, so what can be the problem? I tried compiling the code stated in the manual, but this isn't working either! Thanks in advance! Edited February 12, 2007 by Sypher
Zedna Posted February 12, 2007 Posted February 12, 2007 Remove line with #NoTrayIcon Resources UDF ResourcesEx UDF AutoIt Forum Search
xcal Posted February 12, 2007 Posted February 12, 2007 (edited) This works for me compiled: #NoTrayIcon #include <Constants.au3> Opt("TrayAutoPause", 0) Opt("RunErrorsFatal", 0) Opt("TrayMenuMode", 1) Opt("TrayOnEventMode", 1) TrayItemSetOnEvent(TrayCreateItem("Start"), "_Start") TrayCreateItem("") TrayItemSetOnEvent(TrayCreateItem("Stop"), "_Stop") TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "_Dbl") TraySetState() Func _Dbl() MsgBox(0, '', '_Dbl') EndFunc Func _Start() MsgBox(0, '', '_Start') EndFunc Func _Stop() MsgBox(0, '', '_Stop') Exit EndFunc While 1 Sleep(100) WEnd You could try removing the event part out of the creation part, and see if that helps, like... TrayCreateItem("Start") TrayItemSetOnEvent(-1, "_Start") etc Edited February 12, 2007 by xcal How To Ask Questions The Smart Way
Sypher Posted February 13, 2007 Author Posted February 13, 2007 Just tried your code, it works compiled but it doesn't work when put in my app...
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