WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Sending Keystrokes

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Strange 15 Second Delay in Processing

Keywords: 	  Strange 15 Second Delay in Processing

Question:

I've noticed a strange 10-15 second delay in processing when some of my scripts run. Only once per session. This seems to be confusing the SendKey function. If I run the script again there is no problem. What's going on?

Answer:

In Windows 95 and 95 when you have compressed drives, the drives are not closely inspected until needed. If Windows then decides it needs to obtain drive information for further processing, then it will pause and scan all the compressed drives. It takes a few seconds per drive.

If your script somehow kicks off the drive scanning process... (for example some sendkey to some application requires drive information, and it has not been done already in this session) then windows will go scan the drives, and some sendkey information may get dropped.

If your script suffers from this problem, you can control it by adding the following code to the top of your script..

   dscan=DiskScan(2)
   dsize=DiskSize(dscan)
This does not eliminate the delay, but moves it to a safe spot where it will not interfere with the rest of the script, and it will only do a delay on the first execution after a boot. After that the information is cached in memory, and it goes by that code almost instantly.
Article ID:   W14500
Filename:   Strange 15 Second Delay in Processing.txt
File Created: 2000:03:27:17:49:58
Last Updated: 2000:03:27:17:49:58