473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Emulate user typing

I'm writing a application that is a lot like a macro in C#. Basically, when
a user presses a certain key, the software needs to generate a series of
keystrokes.

I have the code written that listens for the keystrokes using
GetAsyncKeyState from user32.dll ... But for the life of me I can not
figure out how to generate characters as if the user was pressing them.

The keystrokes need to be in a different application which will have the
current focus.

The keystrokes are really simple (ALT X A B C)

Any help is appreciated.

Thanks in advance.
--
Jay Douglas
http://jaydouglas.com

Nov 17 '05 #1
1 1527
Found it:
http://winfx.msdn.microsoft.com/libr...5dabd17e41.asp
--
Jay Douglas
http://jaydouglas.com
"Jay Douglas" <ja****************@squarei.com> wrote in message
news:ea****************@TK2MSFTNGP10.phx.gbl...
I'm writing a application that is a lot like a macro in C#. Basically,
when a user presses a certain key, the software needs to generate a series
of keystrokes.

I have the code written that listens for the keystrokes using
GetAsyncKeyState from user32.dll ... But for the life of me I can not
figure out how to generate characters as if the user was pressing them.

The keystrokes need to be in a different application which will have the
current focus.

The keystrokes are really simple (ALT X A B C)

Any help is appreciated.

Thanks in advance.
--
Jay Douglas
http://jaydouglas.com

Nov 17 '05 #2

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

Similar topics

2
by: Bart Nessux | last post by:
This probaly isn't possible with Python, but I thought I'd ask. I want to emulate a key press programatically. I want the computer (G5 running Mac OSX 10.3) to think that the user has pressed the...
9
by: CW | last post by:
I wrote an HTML based chat application. The front end is built entirely on HTML + javascript. Essentially, I have a hidden frame that's refreshed frequently and any new messages are displayed in...
61
by: /* frank */ | last post by:
I have to do a homework: make a CPU simulator using C language. I have a set of asm instructions so I have to write a program that should: - load .asm file - view .asm file - do a step by step...
0
by: mheys | last post by:
Trying to use richtext box to emulate email address textbox entry of outlook. I want to have multiple items in the text box separated w/ ';' and only valid items underlined. I have been able to...
9
by: Nathan | last post by:
A couple of months ago, I went looking for a .NET grid component with what I thought was pretty simple criteria - I wanted an interface that provided my users with Excel-like data entry capability....
3
by: Brian Bischof | last post by:
I'm have a form with a datagrid showing a checkbox for each row. I want the user to be able to click a checkbox and then click a button that sends an email similar to how the HREF MailTo: works. I...
0
by: Karch | last post by:
I am trying to marshal some binary data in my code before passing it to a SQL Service Broker queue. I found this code for marshaling the binary data, but I would like to also do this in my client...
11
by: Andrus | last post by:
I'm implementing entity object which should populate its properties from database when property is first referenced. In RDL reports I use object properties like MyObject.MyProperty MyObject...
14
by: Eugeny Myunster | last post by:
Hello all, How can i emulate sizeof() only for integers?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...
0
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...

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.