Link to home
Start Free TrialLog in
Avatar of Gadi031698
Gadi031698

asked on

windows/keystrokes emulation

I have to add a component to a product, from which a connection is established to external products (e.g.: ERP products the customer uses). The interface should not be via product-specific API, but through emulation of keystrokes, opertaing the external-product's screens, messages interecepting etc.
Is there a source (site/book) for doing that - and as easy and as general as possible.
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And, the keybd_event, mouse_event, SendInput functions might be useful for you.
Avatar of Gadi031698
Gadi031698

ASKER

Thats good, but I have read that WH_JOURNALPLAYBACK is a global hook.
What I need is that a specific application (out component) plays keystrokes/mouse
in other applications.
Is there a way to do that?

There is an article "Sending Keystrokes under Win32" in Windows Developer's Journal March 1997 Volume 8 Number 3. In this article, the author demonstrate how to use a journal playback hook to send keystrokes to other applications. You can download the source code (Sendkeys.cpp, Sendkeys.h, Sktest.c) at http://www.wdj.com.
That's excellent. I'll be grateful if you know about related 'public' articles (I can't read the article of WDJ over the web - it is not free). We have MSDN.
That's excellent. I'll be grateful if you know about related 'public' articles (I can't read the article of WDJ over the web - it is not free). We have MSDN.
On MSDN Library CDs:

1. A useful article "Win32 Hooks".

2. A sample "MINREC: Demonstrates Journal Hooks Under Win32".

3. Some related KB articles.

You can use the Query tool to search for "journal playback".