Macros

I want to learn how to use macros with C++,
I don't mean the macros where you use #define I mean the ones where you can perform repetitive tasks on your computer or use a few keys over and over. Every time I try to look up the subject I always come up with how to use #define
Maybe if you could set me on the right foot or tell me how to send commands to a keyboard it would be most appreciated
Thanks in advance
-dis
Don't. As a rule, the use of macros in C++ is to be discouraged. Unfortunately, it's a necessity in C.
If you want to simulate user input from a C++ program you should use external library.
On which operating system are you working?
Please explain what it is exactly that you want.

You cannot send commands "to a keyboard". A keyboard is an input device (from), not an output device (to).
You cannot send commands "to a keyboard"
You can, you just need the right library
eg: if working on Windows you can use keybd_event
http://msdn.microsoft.com/en-us/library/ms646304(VS.85).aspx
@PanGalactic, we know that but from what your saying you just said you can't make things like auto typers or that kind of stuff. The reason you have a keyboard is to make it easy to input things, from the inside of the computer, if you tell it to do the right things you can make it process letters WITHOUT the need fora keyboard however there is no point unless you are trying to experiment ect...
Thanks Bazzy.
Topic archived. No new replies allowed.