Ross,

Ideally, scripts should only use about 1 to 5 percent of you're PC's
resources.  To do this, as your script loops around, you'll need a long
enough wait so the loops don't spin too frequently, by using a Wait for .1
to .5 seconds.  

Within the Wait there should be a DoEvents and a Sleep of about 10
milliseconds.  Be sure you have both.  If the Sleep is missing, it may need
the following declaration statement at the top of your script:  

Public Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds
As Long)


Rich McNeil
Boston Software Systems
866 653 5105
www.bostonworkstation.com
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ross Stolle
Sent: Tuesday, March 30, 2004 10:24 AM
To: '[EMAIL PROTECTED]'
Subject: [Talk] CPU Usage

When running fairly uncomplicated scripts my CPU usage is running at 100%.
About 2/3 of it is BWS and 1/3 is Meditech.  Is there something I need to do
differently in the script to minimize this?  It seems it didn't start doing
this until a couple months ago.  The particular scripts in question are
written with BWS 6.0.  Thanks!

Ross Stolle
Integration Engineer
Avera McKennan Hospital
Sioux Falls, SD



____________________
Confidentiality Notice: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure, or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.



Reply via email to