Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows Scripting Host Error
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00838459
Message ID:
00838485
Views:
14
Stuart,

There's no sleep method in WSH. You're probably thinking of the Windows API.

Try this:

Declare Integer Sleep In Win32API Integer

Then just use Sleep(n) in your code whenever you need to pause.



>I want to use the windows scripting host to automate a telnet session but I can't get the script to delay at certain points. According to the syntax it is the sleep command, but that does not work. I get the error OLE error code 0x80020006: Unknown name.
>
>Could someone tell me what is the correct syntax.
>
>Here is my code:
>
>LOCAL Oscript as wscript.shell
>
>Oscript = CREATEOBJECT('WScript.shell')
>
>WITH oScript
> .run('telnet myserver')
> .sleep (200)
>ENDWITY
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Reply
Map
View

Click here to load this message in the networking platform