Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending keystrokes to window
Message
From
13/05/2006 15:02:02
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01120957
Message ID:
01121687
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform