Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Translating WSH sample
Message
De
27/07/2001 09:25:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00536302
Message ID:
00536339
Vues:
10
Yes, thank you, this version works. Did I understand correctly, that every reference to WScript (at the beginning of the line) in the samples has to be converted to an Windows-API call?

Hilmar.

>>Your code fails on the very first line: Object WScript not found. Issuing CreateObject() alone, without an object reference, works:
>
>Sorry, my next attempt (it works):
>
>Declare Sleep IN WIN32API INTEGER
>WshShell = CreateObject("WScript.Shell")
>WshShell.Run("calc")
>=Sleep(100)
>WshShell.AppActivate("Calculator")
>=Sleep(100)
>WshShell.SendKeys("1{+}")
>=Sleep(500)
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform