Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I simluate real mouse click and keyin Out of VFP?
Message
From
28/06/2000 22:37:27
 
 
To
28/06/2000 21:20:04
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00386249
Message ID:
00386267
Views:
15
>I have download KeyText 2000 at http://www.mjmsoft.com/
>
>It can allow to carry the key macros to do action as if a user key-in in real!
>It also simulate Mouse click, dblclick, rightclick.. :)
>
>But how can I use API to do so?!

You can use the SendMessage()(synchronous message firing) or PostMessage() (asynchronous queuing of Windows Messages) API calls to issue various Windows messages like WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN, WM_SYSKEYUP, WM_MOUSEDOWN and WM_MOUSEUP events at will; you'll need to look up the correct values in WINUSER.H, and I'd recommend reading up on how Windows Messaging works in Dan Appleman's "Visual Basic Programmer's Guide to the Win32 API" - the last few chaptrs cover Windows Messages in some detail. There are several hundred Windows Messages available to you; you'll have to experiment to get the effects you want if you want to do it all yourself. The VFP declaration for SendMessage() and PostMessage() are shown in the Win32 API section of the UT.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform