Jump to content
  • Advertisement
Sign in to follow this  
Aternus

Quick question on key input

This topic is 4408 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Yeah... I was bored, so I decided to make a little diddy for my friend. Basically it's a Win32 APP that erm... sort of injects itself into the client of an MMORPG he plays. All it really does is read the address in which his exp is stored and then calculates it telling him how much exp he has until his next level. It's also minimized into the system tray, and to do the function he has to right click the program and click "Calculate exp". But that's a bit inconvienent, so I figured... why not have a hotkey for it so he doesn't have to highlight it? Well, since it's only for that quick little thing I didn't really think it'd be worth implementing a full out input library, so I started flunking around with GetKeyState. No avail. This is what I have right after the WndProc callback
    if (GetKeyState(VK_CONTROL)&80)
       exit(0);
Of course, it only exits because I want to make absolutely sure that the if statement is working, not some function after the if failing. Anyways... it works, but only when I have the menu that appears by right clicking it up. I'd like to be able to check if control is held down while the MMORPG client is highlighted. Making it seem as if it were a button in the actual game. Any ideas on how I could go about this would be much appreciated! -Aternus

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure, but I think you need to Peek at messages for the MMO to process them. If you are just running your app in the background then the keypresses are just going to the MMO. So you need to somehow check those messages. Maybe these would have some help:
Messaging
Peek

But I've never tried anything like this - so maybe someone else will answer ...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!