Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send a keystroke to a hwnd window
Message
 
To
25/03/2004 13:50:23
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00889676
Message ID:
00889720
Views:
25
WM_KEYDOWN is a constant most probably defined in an .h file
In VFP you can define it as a compiler directive
#DEFINE WM_KEYDOWN 0X0100
I hope the above is correct, otherwise I am sure George will correct me :)


>Another question that should be easy for you (:O) how do I declare the following in VFP?
>
>DEFINE WM_KEYDOWN 0x0100
>
>Well the actual original code I'm converting is:
>
>#DEFINE WM_KEYDOWN &H100
>
>and I am not sure what &H100 is in vfp!
>
>>>Here's are a few sample commands for a starting point...
>>>
>>>
>>>DECLARE Sleep IN WIN32API INTEGER nMilli
>>>LOCAL oShell AS WScript.Shell
>>>
>>>oShell = CREATEOBJ('Wscript.Shell')
>>>
>>>oShell.AppActivate("whatever")
>>>Sleep(1000)
>>>
>>>*!*	**	Login
>>>*!*	oShell.SendKeys(lcPassword)
>>>*!*	Sleep(1000)
>>>*!*	oShell.SendKeys("{TAB}")
>>>*!*	Sleep(1000)
>>>*!*	oShell.SendKeys("{ENTER}")
>>>*!*	Sleep(1000*10)
>>>*!*	oShell.SendKeys("%") &&  % = Alt (active menu)
>>>*!*	Sleep(1000)
>>>*!*	oShell.SendKeys("F")
>>>*!*	Sleep(1000)
>>>*!*	oShell.SendKeys("O")
>>>*!*	Sleep(1000)
>>>*!*	oShell.SendKeys("{ENTER}")
>>>*!*	oShell.SendKeys("{TAB}")
>>>*!*	Sleep(1000)
>>>oShell = NULL
>>>
>>>
>>>
>>>Hope this helps,
>>
>>Guy,
>>
>>I think you meant this for Tracy. BTW, you can also use the ~ for the enter key.< s >
Previous
Reply
Map
View

Click here to load this message in the networking platform