>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.