Hi Ted,
one of your lines intrigued me; I had never realized that you could wait.for
"while computing"
> WAIT.For(2000, hThis!=ASSIGN("hAct", WIN.Handle("active")) && hAct)
it made me realize that WAIT.For is sort of a specialized version of FOR, one
that is better suited to deal
with time. But FOR can be just as easily used to wait and compute, and it's
probably more efficient that
WAIT.For at that, just because it isn't constrained by expression syntax like
Wait.For is.
; BEGIN script
local t0,t1
local i=0
t1=timesec+2
for(t0=timesec;not shift && t0<t1;t0=timesec)
i=i+1
endfor
win.debug("for",i)
i=0
wait.for(2000,not assign("i",i+1))
win.debug("wait.for assign",i)
i=0
wait.for(2000,do("i=i+1")=="never")
win.debug("wait.for do",i)
; END script
I get this output on my PC:
for 1615
wait.for assign 400
wait.for do 386
revealing that FOR is 4x more efficient, in this particular case.
I guess WAIT.For is less CPU-intensive than FOR for "just waiting" around?
--sgp
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/JV_rlB/TM
--------------------------------------------------------------------~->
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/