C++ Learning Community Forum
August 01, 2010, 02:34:13 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Hello. Smiley
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Holding down keys  (Read 447 times)
oulyt
C++ Freak
***
Posts: 340



View Profile
« on: August 09, 2009, 12:34:41 AM »

Im trying to make a program that hold down 3 keys for 30 seconds. lets say the 'z', 'x', and 'c'. then after 30 seconds it lets go pauses for 5 then holds them again for 30. and it would be doing this to a different window, lets say notepad.

I was thinking keybd_event but that dosnt seem like it holds the keys down. sendmessage might work with wm_keydown but i have no idea how to do that. i was reading it but didnt get most of it >.<
Logged
FrozenKnight
ASM Freak
Global Moderator
Dr. of C++ology
*****
Posts: 546


Do it yourself it's the only way to learn.


View Profile
« Reply #1 on: August 10, 2009, 01:20:03 AM »

keybd_event does hold down keys take a closer look at the msdn page.
« Last Edit: August 10, 2009, 01:22:58 AM by FrozenKnight » Logged


Imagine the impossible, then make it happen.
oulyt
C++ Freak
***
Posts: 340



View Profile
« Reply #2 on: August 10, 2009, 04:56:46 AM »

aah, yes. i got it working.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!