Sunday, June 04, 2006

Sleep function in LotusScript

If you want to pause script execution in LotusScript, yuo can use Sleep function. You might want to do it if you need to wait until external operation completes.

Sleep n

Where n is a number of seconds.

If you want to pause for less than 1 second, use following:
Sleep 0.2 ' pause for 200ms

Another good function to use in conjunction with Sleep is DoEvents. Using DoEvents in code allows you to stop looping code with Ctrl+Break keyboard command. Without it Notes client is often not responsible to break command.
Documentation says that Doevents and Yield functions are same, but in my experience DoEvents works much better... at least in older versions of Notes.

Call MyObject.SendExternalMessageDLL("message")
While Not MyObject.Status=2
sleep 0.1

1 comment:

Adi said...

Oes Tsetnoc one of the ways in which we can learn seo besides Mengembalikan Jati Diri Bangsa. By participating in the Oes Tsetnoc or Mengembalikan Jati Diri Bangsa we can improve our seo skills. To find more information about Oest Tsetnoc please visit my Oes Tsetnoc pages. And to find more information about Mengembalikan Jati Diri Bangsa please visit my Mengembalikan Jati Diri Bangsa pages. Thank you So much.