Solved

a 'recorder' type program detecting and replaying mouse events and keyboard events while program is minimized

Posted on 2006-10-30
2
272 Views
Last Modified: 2010-04-16
Hello,

Remember that really old program that came with windows 3.1 called 'recorder'?  Well I'm trying to recreate it in C# for help with software testing.  My goal is (preferably without help of the windows api) to have a program minimize itself, then record everything that I do (with regard to keyboard presses and mouse clicks and moves) until I click on the minimized taskbar button of my recorder application.  Then write all that stuff to a script so I can replay it later.  I don't really know where to get started, but it would be helpful first of all to know how to detect keyboard presses, and mouse moves and clicks while my application is minimized.  Can anyone help?

Thanks
0
Comment
Question by:prosh0t
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 17836043
(preferably without help of the windows api)

You won't be able to accomplish this without the use of APIs...not unless you find a DLL/Control that someone else has already written that can do all this for you!

What you need is a low level keyboard/mouse hook to detect keypresses/mouse movements while your app is minimized.

See TheLearnedOne's example here:
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21475143.html

Then to later "replay" those events (after storing them somehow...that's a whole different ball of wax) you would need some more APIs.  SendInput() is one way:
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_20641926.html
0
 
LVL 7

Author Comment

by:prosh0t
ID: 17836130
Thanks!



0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

10 Experts available now in Live!

Get 1:1 Help Now