Sign in to follow this  
Followers 0
karman

autoit deadlock

8 posts in this topic

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

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by karman

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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..

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  
Followers 0