Hi I need help with the use of doing simulating key press. I've been to MSDN and seen what they said about it, but I dont fully get it what they are showing me. I know this sites good at showing/telling the use of code so I am hoping.
Printable View
Hi I need help with the use of doing simulating key press. I've been to MSDN and seen what they said about it, but I dont fully get it what they are showing me. I know this sites good at showing/telling the use of code so I am hoping.
getch()
Here is a few example programs of it's use by moi.
Thanks i'll take a look at thes.
Oh... no this is not what I am talking about. Thes see what you type then echo it back. What I want to do is simulat a keypress like a marco with my programe, so that it types out on other programs also.
On Windows, something like this:
?Code:keybd_event( VK_RETURN, 0, 0, 0 );
keybd_event( VK_RETURN, 0, KEYEVENTF_KEYUP, 0 );
keybd_event
On NT, 2000, and XP, you're supposed to use SendInput function, but I never could figure out how to use it.
Ya I seen that used but I cant figer it out my self. Trying to understand it with NSMD but their way of showing is a little not thereXD.
How about google?
LOL, yes, I did try that. I also try yahoo. I dont get much help on thos that great.
You're trying to figure out how SendInput works?
Try searching this board: http://cboard.cprogramming.com/searc...earchid=289138.
[edit]
Maybe codeplug's links at the end of this thread.
[/edit]
LOL goo thinkingXD i'm looking at like 20 websits for thisXD My head isnt thinking very good.
Ok I found some new stuff on it and that I get with more working with the code. I'll check it out how ppl are setting it up on theirs and try to work with it for my use. Thanks^.^
Hi again, sorry I didnt want to make another post on this seeing as its the same thing as befor. Ok i've been almost everwhere trying to learn this:) I mean I dont have a problem ;) LOL, but i've seem some differnt ways on how to simulate a key pressing. Like keybd_event() I can get this one, i've also seen SendInput(), SendMessage() and PostSendMessage () ,or something like that. I didnt see on much like how to use them tho, what I mean is, go in detail on them mostly. Yes i've look them up, but I had no luck on it much for how to use them. I was just asking if maybe someone could help me on the details a little on them or maybe make a little examples on them so I can see how to use them mostly.
For keybd_event() I got this working ok.
It simulates a "s" key, but even then I dont know much on whats going on in it. I do get most of it, like the top part is pressing the key then the botten part "un"press the key. The 0's I dont know much on tho. Sorry I dont mean to ask something so hug, I just like understand what something does befor using it really.Code:keybd_event(0x53,
0,
0,
0);
keybd_event(0x53,
0,
KEYEVENTF_KEYUP,
0);