Solved

windows/keystrokes emulation

Posted on 1998-04-21
7
317 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows Standards for file storage. 3 37
Windows Mobile 6.5 device Apache Flex 3 49
Vb.Net Loading Word 11 109
Input parameteres to DragOver 2 56
This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 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