473,582 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to perform mouse/keyboard events for user? Like macro tools do

I want to do something similar to what some macro tools do, where they
perform mouse/keyboard events on the user's machine , while intercepting the
user's current keyboard/mouse events so that it does not interfere (unless
they press a certain hotkey to deactivate it). How would I go about doing
this?
Oct 29 '07 #1
1 1666
This would be a two-step process. To send input to an application, you
will have to call the SendInput API function through the P/Invoke layer. To
intercept all input for a window, you will have to create a windows hook
(which will require more calls through the P/Invoke layer).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"MrNobody" <Mr******@discu ssions.microsof t.comwrote in message
news:50******** *************** ***********@mic rosoft.com...
>I want to do something similar to what some macro tools do, where they
perform mouse/keyboard events on the user's machine , while intercepting
the
user's current keyboard/mouse events so that it does not interfere (unless
they press a certain hotkey to deactivate it). How would I go about doing
this?


Oct 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2525
by: Jesper Kampfeldt | last post by:
Hi, Can anybody tell me how to move and click with the mouse cursor out side of a swing frame. More specific, I what to make a java program for doing a macro that press a button in a windows application with certain interval. /Jesper
8
3415
by: Nolan Martin | last post by:
Is it just me or are there no good librarys out there to access the keyboard or mouse? I have been looking around for a while now and can only find ones that are bundled with a bunch of other stuff that I dont need (SDL, GLUT). I just need a simple platform independant way to access the keyboard and mouse. Anyone know of any good ones?
0
5773
by: George Hartas | last post by:
I am using Visual C# .NET 2003 to make a ComboBox accept both mouse and keyboard selection. For mouse selection code, I double-clicked ComboBox to get the default "comboBox1_SelectedIndexChanged" event. This code (see below) by itself works as expected with a mouse. But when using keyboard arrows to navigate the ComboBox drop- down, the...
3
4475
by: Rick Strahl [MVP] | last post by:
I'm working on an app that's using the WebBrowser control. I got the control working fine, hooking to the document object. But I've run into a major issue with hooking the Document events. Whenever I hook any of the HTMLDocumnetEvent2_Event events like this: HTMLDocumentEvents2_Event DocEvents = this.Browser.Document as...
2
10079
by: KarenP | last post by:
In my Windows Forms application, while executing a process that takes some time, I am changing the cursor to the hourglass by setting Cursor.Current = Cursors.WaitCursor. This is working just fine, except that any mouse events generated during this wait period (such as clicking on a button, etc.), get processed once the processing is...
0
2773
by: learner404 | last post by:
Hello, I have a Windows Pyhon-Tk app which need to capture mouse end keyboard events even when the app is not in focus. On Windows so far I've used the excellent PyHook which does the job perfectly: " The pyHook library wraps the low-level mouse and keyboard hooks in the Windows Hooking API for use in Python applications."
16
10921
by: dfaber | last post by:
Hi all, I have been searching for a keyboard and mouse tracker on linux. I've read solutions (watch at sourceforge) which look at /proc/interrupts to check keyboard or mouse activity. I also read one post where "watch" seems to have difficulty tracking usb keyboards and mice. So, I'm out of ideas here. My goal are: 1. Check keyboard...
0
1601
by: Gamey | last post by:
I have an application that NEEDS (don't ask) to handle additional mouse and keyboard processing during DoDragDrop. Normally, DoDragDrop kindly squashes all keyboard and mouse events. Alternate, more specific events, are used in their stead such as DragEnter, DragLeave, DragHover, GiveFeedback, and QueryContinueDrag. None of these give me...
0
1091
by: ludwig.frank | last post by:
Hi, I am attempting to detect mouse clicks from within curses, using "select" on sys.stdin. It is working great within an xterm under X, but not very well in a "real" linux console. When I click my mouse while on the "real" console, nothing happens at first, even on repeated clicks. Once I press a keyboard key, I see a "409" in my trace,...
0
7809
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8312
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7920
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8183
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6569
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5685
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1413
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.