Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 12th, 2007, 07:58 PM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Bourne
Default Simulating a key press with c++

Hi, I am looking to write a simple C program that can simulate a button on the keyboard being pressed.
Something simple, like when you execute the program, it simulates the "Z" key being pressed once, waits 4 seconds, simulates another key press, waits another 4 seconds, etc.

If anyone knows how to do this, I would greatly appriciate it.


Reply With Quote
  #2 (permalink)  
Old April 13th, 2007, 12:49 PM
Authorized User
 
Join Date: Mar 2007
Location: , , USA.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

in windows you can get good advice here: http://www.codeproject.com/cpp/sendkeys_cpp_Article.asp
enjoy!

Reply With Quote
  #3 (permalink)  
Old April 13th, 2007, 03:03 PM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Bourne
Default

Thank you I will use that.
:)

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Press Print Screen Key Using JavaScript sundar53 .NET Framework 2.0 0 November 4th, 2007 08:48 AM
Key press problem diegoblin Beginning VB 6 3 October 5th, 2006 03:10 PM
TAB KEY working together KEY PRESS event thomaz C# 4 August 20th, 2006 03:47 PM
key press event in webforms agnihotrived ADO.NET 4 March 19th, 2005 03:22 PM
Force a Key Press? ashley_y VB How-To 2 January 9th, 2004 03:59 PM



All times are GMT -4. The time now is 06:24 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.