[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

windows/keystrokes emulation

Posted on 1998-04-21
7
Medium Priority
?
337 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 40 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

873 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