Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending keystrokes to window
Message
De
13/05/2006 15:02:02
 
 
À
11/05/2006 09:08:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
01120957
Message ID:
01121687
Vues:
19
You can send any keystroke to a window once you found the handle of
the window, as you did.
Use the PostMessage() API function to send WM_CHAR messages.

For example:
DECLARE INTEGER FindWindow IN WIN32API INTEGER, STRING
DECLARE INTEGER PostMessage IN WIN32API INTEGER, INTEGER, INTEGER, INTEGER
WM_CHAR = 258
hw = FindWindow(0, "Oracle Applications - PROD #1")

str = "FC.EN.CD" 
FOR i=1 TO LEN(str)
       ? PostMessage(hw, WM_CHAR, ASC(SUBSTR(str,i,1)), 0)
ENDFOR
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform