Page 1 of 1

Making keyboard macros

Posted: Sun Nov 21, 2010 11:12 am
by superLED
Hello there!

I am currently developing a small program that allows me to take control over the keyboard.
However, I've come across a wall that I need to climb over to make further progress.

Until now, I've set almost everything up. I have programmed a window with different menus,
and I can read the user's input (tracking the keys that are being pressed).

And with that information stored, I want to set that key to do something special, like automatically type "Hello my friend!".
Here's my problem, you see. I have no clue on how I can make the program type anything at all.
I really need to know how I can make my program type stuff out, just like you would typing on the actual keyboard.

I am using Windows Vista, programming in C++ with Dev-C++ as my IDE.

Thanks for all answers!

Re: Making keyboard macros

Posted: Sun Nov 21, 2010 11:24 am
by pritam
This. Make sure you delay the keystrokes a little bit one after the other, too many of them will have you forced to cut the power so be careful.

Re: Making keyboard macros

Posted: Sun Nov 21, 2010 12:17 pm
by dandymcgee
You could always take a look at http://www.autoitscript.com for a higher level approach. It's a scripting language originally designed with automating windows tasks in mind. Developing something like this would take just a few minutes for anyone with a basic understanding of programming.

Re: Making keyboard macros

Posted: Tue Nov 23, 2010 5:19 am
by superLED
Thank you so much! Got just what I was looking for.
Now the journey can finally move on :D