Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement