karman Posted July 7, 2009 Share Posted July 7, 2009 Does anyone know of any reasons why OnEvent tray's stop responding as in nothing happening when i click one of the tray menu items? please post any reasons u know of for example something as "simple" as this can stop working in my program, and i have No idea why so i cant post any code and reading through my whole program would be a full time job Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 3) TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "my_exit") Func my_exit() Exit EndFunc so if you know why/when OnEvent tray's stop working, please share any info so i can check if my program could be doing the same. thx in advance 8P Link to comment Share on other sites More sharing options...
Developers Jos Posted July 7, 2009 Developers Share Posted July 7, 2009 Is this example supposed to show your problem ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
karman Posted July 7, 2009 Author Share Posted July 7, 2009 no, im simply asking if anyone here knows what can cause onevent tray functions to stop working/responding. it happens in my program and i have no idea why. Link to comment Share on other sites More sharing options...
Developers Jos Posted July 7, 2009 Developers Share Posted July 7, 2009 Why post an confusing example? post one that replicates your problem. Anyways, an Event has to finish before the next event will fire. In other words, when an Event call a Func you need to exit that func again and not stick in it with some while ... wend loop. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
karman Posted July 7, 2009 Author Share Posted July 7, 2009 (edited) problem: my program gets "stuck" for some reason, and then the tray function doesnt respond. example i posted, is the function i have in the tray menu. and i cant post any example to replicate it because i have No idea what is causing it. thats why im asking if someone else had any problems with onevent tray menus getting stuck or whatever, and if they know why maybe you could share some more info about the onvent tray stuff, like any reason it wouldnt work to click my Exit function.. thats my only function in the tray! Edited July 7, 2009 by karman Link to comment Share on other sites More sharing options...
Developers Jos Posted July 7, 2009 Developers Share Posted July 7, 2009 I just shared that with you and you haven't responded to it. I am out of this thread till you have posted a reproducing script. To get one you just take a copy of your script and start stripping till you have a barebone version. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Inverted Posted July 7, 2009 Share Posted July 7, 2009 Well, autoit is single-threaded, so if it gets stuck in a loop or in some command that "waits" for something, then the script is as good as paused. Link to comment Share on other sites More sharing options...
karman Posted July 7, 2009 Author Share Posted July 7, 2009 big thx inverted, it actually helped me to remember something..i think SendMessage is causing my script to get stuck, because it doesnt return until the window procedure has processed the message. damn! PostMessage here we go.. 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