Jump to content

autoit deadlock


Recommended Posts

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

  • Developers

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

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
Link to comment
Share on other sites

  • Developers

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...