Solved

windows/keystrokes emulation

Posted on 1998-04-21
7
310 Views
Last Modified: 2013-12-03
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.
0
Comment
Question by:Gadi031698
  • 4
  • 3
7 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 10 total points
ID: 1298734
In your case, I think the best way is to install a WH_JOURNALPLAYBACK Hook by using the SetWindowsHookEx function. The WH_JOURNALPLAYBACK hook enables an application to insert messages into the system message queue. You can use this hook to play back a series of mouse and keyboard. Look into the documentation about Hooks.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1298735
And, the keybd_event, mouse_event, SendInput functions might be useful for you.
0
 

Author Comment

by:Gadi031698
ID: 1298736
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?

0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 23

Expert Comment

by:chensu
ID: 1298737
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.
0
 

Author Comment

by:Gadi031698
ID: 1298738
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.
0
 

Author Comment

by:Gadi031698
ID: 1298739
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.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1298740
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".
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now