Hi. --- In [email protected], miinx <[EMAIL PROTECTED]> wrote: > ;-- -- -- -- -- -- -- -- -- -- -- -- > ; Check for Moz prompts > ;-- -- -- -- -- -- -- -- -- -- -- -- > if (arg(1)==3 && arg(3)=="XPCOM:EventWindow" && (exe== "firefox" || > exe=="thunderbird" || exe=="thunde~1")) do
You have to be careful when using HookWindowEvents. When checking for classes, you have to make sure that these are somehow unique. "XPCOM:EventWindow" is a generic Mozilla-class, it's a message-window and it is probably used a thousand times on a thousand occasions by Mozilla. As far as I understood, this script should react on prompts. Did you try to use the window class of the prompt (#32770)? > (altho the page still stalls for a bit at the point where it was > crashing, but now it eventually moves on & finishes rendering.) I think there is simply a system overload because PowerPro tries to run all the waits you tell it to run. > However, one question, just trying to understand what happened -- does > having a wait() in the window hook script mean that, when it is > encountered, no other windows can be created/destroyed/etc until the > wait completes? No. This would be terrible, if PowerPro could do this. What happens is simply: XPCOM:EventWindow is created -> PowerPro waits for prompt... next XPCOM:EventWindow is created -> PowerPro waits for prompt... next XPCOM:EventWindow is created -> PowerPro waits for prompt... ... This goes on as long as PowerPro and/or your machine allows it. > So, like, can the hook script fire multiple concurrent times for > separate window events that are all happening together? Or does each > window event get queued up to be processed by the hook script? or > something else? PowerPro receives a message for every window event that is happening and runs the script, i.e. it tries to run it and does its best to keep up with the events. It's very likely that some concurrent events are missed this way. The more complicated your script gets and the more often you tell it to run something (e.g. wait), the more difficult it gets for PowerPro. > And so, should I maybe not be using wait()s in my hook windows script? You can. But it has to make some sense. I use some waits in my hook-script, when I can't avoid it. E.g. I have an app that creates a uniquely named class and shortly afterwards a window with a unique caption becomes visible. I can wait.for that without a problem. Because it will most likely happen only once in a longer period. But that is certainly not the case for Mozilla and XPCOM:EventWindow windows. > Thanks again, Bruce, hugely appreciate the help!! Being not Bruce, I hope that it's not completely wrong what I'm writing here. But I take that thanks nevertheless ;-) Mockey Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
