?
Solved

windows/keystrokes emulation

Posted on 1998-04-21
7
Medium Priority
?
334 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 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
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.

 
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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

650 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