Re: Creative ways to time scripts? by John
John
Sat May 13 09:31:47 CDT 2006
"Anthony Jones" <Ant@yadayadayada.com> wrote:
>
> "John Doe" <jdoe@usenetlove.invalid> wrote in message
> news:Xns97C0880B085F0123456789@207.115.17.102...
>> What I mean by "creative" is to avoid using Wait/Pause/Whatever
>> commands, but commands that also don't do anything. The command
>> would try to get the system to tell when the current program is
>> ready for input and the next script line should be executed. I
>> realize that is a difficult task, and that timing oftentimes
>> depends on the circumstance. Any guesses would be appreciated.
>>
>
> It's not clear what you want to acheive and/or why.
>
> The command is part of the current program or a shelled program?
>
> Perhaps if you outlined a scenario it would be clearer.
A recent post is one of a million examples.
Message-ID: <D988A177-1BEC-4FDA-9424-61829C0F8093 microsoft.com>
He needs to know when a file has been completely downloaded so that
he can copy that file. Using a generic timing method for playback,
that probably would be difficult if not impossible to do without
help from the operating system.
My best effort, before moving to Windows XP, would properly time
file operations in Windows Explorer.
Message-ID: <Xns9545963F8C237wisdomfolly 66.150.105.41>
The playback timing is dynamic so that many script operations within
Windows will not begin until the prior operation is complete. For
example, I could delete an entire directory that would take two or
three seconds, and the next operation in the script which depended
on the new directory structure would not execute until the end of
that directory deletion operation. The idea is pretty simple, to get
your script to wait until the program has finished with your script
directed operation, to wait until the application(s) has finished
processing input, and to do that programmatically without polling.
What I'm talking about with Visual Basic Scripting VBS is not to
rewrite the code responsible for playing script lines (I guess that
would be Windows Scripting Host, or whatever), but to
programmatically insert do-nothing commands that can help with
timing.
I don't expect active cooperation from the operating system, but
there's lot of room for hacking.