Page 1 of 1

Wait; Pause or Sleep

Posted: Fri Sep 12, 2014 6:18 pm
by MPG
Hi,
I developed a script that does a spell check on the track using MS Word which has been posted to the Addon Forum. I just upgraded to Office 2013, and now Word is crashing because the call to do the spell check is occurring before Word has finished loading. So, I had to put in the dreaded For loop that does nothing.

For intCnt = 1 to 100000
inctCnt = intCnt +1
Next

I couldn't figure out a way to invoke the following code
Application.Wait(Now + #00:00:03#)

Is there a nice way to delay processing?

MPG

Re: Wait; Pause or Sleep

Posted: Sat Sep 13, 2014 10:26 am
by crap_inhuman
MPG wrote:Hi,
I developed a script that does a spell check on the track using MS Word which has been posted to the Addon Forum. I just upgraded to Office 2013, and now Word is crashing because the call to do the spell check is occurring before Word has finished loading. So, I had to put in the dreaded For loop that does nothing.

For intCnt = 1 to 100000
inctCnt = intCnt +1
Next

I couldn't figure out a way to invoke the following code
Application.Wait(Now + #00:00:03#)

Is there a nice way to delay processing?

MPG
Just use a mm function :

SDB.Tools.Sleep(1000) = Wait 1 sec

Re: Wait; Pause or Sleep

Posted: Sat Sep 13, 2014 10:58 am
by MPG
Awesome. Thanks.