Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Sage MAS Partner
FunkMoney33
Posts: 47
Registered: 03-31-2009
0

WScript.Sleep Method

What is the correct syntax for calling Wscript.Sleep?

 

This works fine outside of MAS:

 

     WScript.Sleep 500

 

But it throws an error when inside of a MAS script.  It says "Invalid/unknown property name".  It doesn't like the WScript token.

 

I guess I have to create an object first, but what object do I create?

 

Thanks.

Super Contributor
connex
Posts: 794
Registered: 10-29-2008
0

Re: WScript.Sleep Method

I've done this by calling another script. One could loop on a timer, but that burns CPU.  I would also like to know if anyone else has done this in the initial script file.

Dan Burleson
Sage Authorized Consultant - Ask me about advanced scripting!
e-mail me here
Sage MAS Partner
FunkMoney33
Posts: 47
Registered: 03-31-2009
0

Re: WScript.Sleep Method

That did work, calling another script, this one calling WScript.Sleep...

 

Set objShell = CreateObject("WScript.Shell")
objShell.run "C:\MAS90V4\4.4\MAS90\CM\Script\Sleep.vbs", 1, true

 

The Sleep.vbs script contains one line, which looks like...

 

WScript.Sleep 500

 

Doing it this way seems kind of silly though.

 

If anyone knows of a way to get their script to sleep directly, when the script is running in the context of a UDS, it would be great if you could share it.

 

Thanks.

 

Aaron