brucexs wrote:
> Are you using hookwindowevents?
Hey Bruce, thanks so much for your ideas, and yes, I'm using
hookwindowevents & you were spot on -- the culprit is in my window
events hook script.
I've got a section that looks for a Mozilla password prompt, &
automatically enters my master pw when required. What seems to be
happening is that the problem web page opens & shuts 13 separate
"XPCOM:EventReceiver" windows as it is being rendered -- they would be
for the AJAX calls, I'm assuming.
[AJAX is new name for a not-so-new technique of allowing a web page to
load/reload/download content from the server that is shown within the
page, but without actually reloading the whole page itself.]
These 13 windows break my script & crash PP, it seems. The relevant bit
of my hook script is:
;-- -- -- -- -- -- -- -- -- -- -- --
; Check for Moz prompts
;-- -- -- -- -- -- -- -- -- -- -- --
if (arg(1)==3 && arg(3)=="XPCOM:EventWindow" && (exe== "firefox" ||
exe=="thunderbird" || exe=="thunde~1")) do
wait.for(10000, activewindow("Prompt"))
wait.for(1000)
if (not visiblewindow("Prompt")) do
quit
elseif (win.width("Prompt")==405 && (win.height("Prompt")>140 ||
win.height("Prompt")<146))
win.sendkeys("{to ^Prompt}min1girl{en}")
endif
quit
endif
The Event Receiver debug lines are each something like:
arg(1)=4
arg(2)=3737542
arg(3)=XPCOM:EventWindow
arg(4)=XPCOM:EventReceiver
exe=firefox
I've just tried a few changes with the script & find that changing the line:
wait.for(10000, activewindow("Prompt"))
to
wait.for(3000, activewindow("Prompt"))
lets the page load.
(altho the page still stalls for a bit at the point where it was
crashing, but now it eventually moves on & finishes rendering.)
I had big wait() in there cos my system was ridiculously sluggish for a
while, but it's better now so the monstrously big wait is not needed.
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?
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?
And so, should I maybe not be using wait()s in my hook windows script?
Thanks again, Bruce, hugely appreciate the help!!
Karen
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/