Dominic,

In your email, you asked for a "less looping method" than that of your code, which has 
a high performance cost. Below, I've adapted a segment of your code to include the API 
function "Sleep" which causes the code to suspend operation for a period of time. 
Within a loop, this function can cause the loop to run once every 5 seconds, 10 
seconds, or any interval you like. 

******************************************************************
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Integer)

''''lots of your other code''''''''''''''''

Do
    intAppRunning = FindWindow(ClassName, Title)
   ' handle is > 0 till batch stops running
  Print "Running Batch..."
  Call Sleep (5000)
  ' Program suspended for 5 seconds

Loop While intAppRunning > 0
*******************************************************************

Cheers
Tom Colley
Sustainability Systems Analyst
Blue Mountains City Council
Tel: (61.2) 4780-5451
[EMAIL PROTECTED]


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 10906

Reply via email to