Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keyboard command
Message
De
03/12/2002 17:29:52
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00729091
Message ID:
00729184
Vues:
13
Chr(46) is not the same as Alt+C. Inkey() returns 46 to represent that the user pressed C and Alt, but for a more accurate representation you have to look at the ASCII code and the scan code of Alt, Ctrl, Shift.

If you can fire off the application yourself, you can use WSH:

oWSH = CreaterObject("WScript.Shell")
oWSH.Run("C:\WINDOWS\CALC.EXE")
oWSH.AppActivate("Calculator")
oWSH.SendKeys("123(+)") && Send 123 and the plus sign (add)
oWSH.SendKeys("456~") && Send 456 and the equal sign


Go and check calculator and should see 579.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform