Hi sgp,

first let me expand my statement:
AM> I do agree with Bruce not mentioning such examples of
AM> wait.for(expression) on the Wait page, because there are
AM> now so many -- as many as there are suitable Functions.

In fact there are even more; not only any suitable functions
but also any expression which will resolve as either false
[== zero or ""] or true; for example a comparison of a global
user variable.
I just tested this script:

Henry = 4
win.debug("waiting")
wait.until(Henry == 5)
win.debug("Happy birthday Henry")

and it paused after showing "waiting" until I clicked my test button
which has the command: Henry=5

____________________________________________

sgp wrote:
s> No, actually it's a great summary of how to use the new power of powerpro.
s> Back to the help file then, the *keys documentation explicitly mentions
s> wait ready as a means to wait until a newly started app is ready to accept
s> input. Maybe it would be better to change that reference to something else
s> equivalent to wait ready ...

I agree: either "wait ready" should be replaced on that *keys page
or it should be mentioned in the *wait page.

s> ... by the way, what would that be with the new syntax?

I am only a designer with limited scripting skills
and my understanding is incomplete.
I'll try to give the new equivalents of all the old Wait actions
hoping someone will correct me if any of them can be done better.
My uncertain parts are marked [?].

In all cases I'll use "wait.for" but remember there is
also wait.until with the same parameters.

Wait for m milliseconds: *wait sleep m
mentioned in Help *Wait; same as before.

Wait for n seconds: *wait n ;; n was in seconds
Now: wait.for(n) ;; in milliseconds instead of seconds.
Mentioned in Help *Wait

Wait until command is ready for input: 
*wait ready captionlist 
"The caption_list is optional.  If omitted, PowerPro waits until
the last file launched by PowerPro is ready for input up to a
maximum of 10 seconds.  If the caption_list is present, PowerPro
waits until any window selected by the caption list is ready to
accept input up to a maximum of 10 seconds."

Now: wait.for(10000,activewindow(captionlist))
[That's if you wish to keep the 10 second maximum wait
which is now an optional/flexible maximum]
I guess "ready for input" and "activewindow" are equivalent. [?]
I am not sure how you specify "the last file launched by PowerPro"
as your captionlist parameter. [?]
Usually you would know this and be able to mention it specifically.

Wait until command exits: *wait done captionlist
Now: wait.for(not anywindow(captionlist))
or insert a flexible maximum delay like this:
wait.for(3000,not anywindow(captionlist)

Wait for modem to be connected (Dial-Up Networking RAS connection only):
old command: *wait modem
Now: wait.for(3000,modem)

Note in that one and in all the following, the "3000," (or any number
or an expresion for the number of millisecs) is optional.

Wait for modem to be disconnected (Dial-Up Networking RAS connection only):
old command: *wait nomodem
Now: wait.for(not modem)

Wait until window with specified caption is active (foreground):
old command: *wait active xxx
Now: wait.for(10000,activewindow(captionlist))

Wait until window with specified caption is not active (foreground):
old command: *wait noactive xxx
Now: wait.for(10000,not activewindow(captionlist))

Wait until window with specified caption is running:
old command: *wait window xxx
Now: wait.for(10000,anywindow(captionlist))
to include hidden tasks; or:
Now: wait.for(10000,visiblewindow(captionlist))

Wait until window with specified caption exits:
old command: *wait nowindow xxx
Now: wait.for(10000,not anywindow(captionlist))

Wait until command with specified exe path is running:
old command: wait [n] path c:\path\prog.exe
Now: wait.for([n,]anywindow(captionlist))
using =exename for the captionlist,
Or: wait.for([n,]exefullpath == "c:\path\prog.exe")

Wait until command with specified exe path exits:
old command: wait [n] nopath c:\path\prog.exe
Now: wait.for([n,]not anywindow(=prog))

wait.message(n,expression) [or: wait message n,expression]
is slightly changed from before; it now takes an expression or the
literal message text in quotes; it used to take unquoted literal text.

Wait for mouse or keyboard activity
*wait activity ;; unchanged; still in Help *Wait

Wait for alt, ctrl, or shift key
old command: *wait ctrl [n]
new: wait.for([n,]ctrl)
old command: *wait noctrl [n]
new: wait.for([n,]not ctrl)
Note the optional maximum pause is now in milliseconds.

old command: wait quit
unchanged

_____________________________________

Several of the new forms have increased flexibility
such as fixed maximum waits now being flexible/optional;
and max waits now being in milliseconds instead of whole seconds;
and choices such as:
old command: *wait window xxx
Now: wait.for(10000,anywindow(captionlist))
to include hidden tasks; or:
Now: wait.for(10000,visiblewindow(captionlist))

Similarly, with the new equivalent to Wait Path
you can choose a form which requires the full path to be specified
or one which only requires the exe name.

______________________________________

Unfortunately, I still haven't answered your specific question
about *wait ready [with no captionlist] well enough.

I hope someone else can clarify how waiting
"until the last file launched by PowerPro is ready for input"
can best be done without Wait ready.
In fact, "wait ready" still works, though undocumented.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/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/
 

Reply via email to