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