--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], "swzoh" <seanzoh@> wrote:
> >
> > Hi Bruce,
> >
> > The code is from the magnifier script, and now it crashed PP, with
> the
> > error message:
> >
> > Bad expression: expecting value or variable at
> >
> > Looks like the variable _close_ is evaluated and combined into the
> > command of the event at parsing time, so the whole length exceeds
> the
> > limit 530 and causes the crash.
> >
> > local _close_ = ;;+
> > ?'++dll.call("ReleaseDC|ui ui",'++hWnd++","++hDC_TT++")"++;;+
> > ?'++dll.call("ReleaseDC|ui ui",'++0++","++hDC_SC++")"++;;+
> > ?'++dll.call("DeleteDC|ui",'++hDC_MM++")"++;;+
> > ?'++dll.call("DeleteObject|ui",'++hBM++")"++;;+
> > ?'++dll.call("DestroyWindow|ui",'++hWnd++")"
> >
> > event.createms(20,0,;;+
> > ... ;; very long in length
> > ?'++do(if(mouseleft&&shift,?`event.destroythis()'++ _close_
> ++?'`))')
>
>
> I have note changed anything in this area that I can think of. It
> should not crash, but it won't be able to handle strings >530 as
> part of do or in any command (do just produce a command line
> internally). Also there is a limit on expressions, although it is a
> bit longer.
>
> Possibly calling back to a clean-up routine rather than having the
> long lists of dll.calls might work. (BTW, don't you need \r\n's
> between those dll calls?).
I found the culprit, but I don't understand why:
?'++dll.call("DestroyWindow|ui",'++hWnd++")"
If I replace it with
?'++win.close('++hWnd++")"
then no problem at all.
I don't know why it's still not replaced by in my script while I found
that it was already replaced in the one uploaded to the file section.
And, strangely, it I put more command like
?'++win.debug(win.close('++hWnd++"))"
then, it crashed PP again.
I don't think it's a length limit problem as still the same symptom
even if I put the command at the first line.
I'm just wondering if it's related with the latest implementation of
chain operation with window handle, but couldn't figure out how.
Sean
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/power-pro/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> 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/