Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Scripting Host Error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00838459
Message ID:
00838485
Vues:
15
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform