Shoutbox

Reading Key Down - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Reading Key Down (/showthread.php?tid=64292)

Reading Key Down by Omnipotence on 07-31-2006 at 08:03 PM

Is there a way of reading keys being typed by the user while not actually being in the chat window? So that say they could type up a command on the fly from the contact list and open up some form of configuration window or etc.


RE: Reading Key Down by matty on 07-31-2006 at 08:42 PM

quote:
Originally posted by Omnipotence
Is there a way of reading keys being typed by the user while not actually being in the chat window? So that say they could type up a command on the fly from the contact list and open up some form of configuration window or etc.
Take a look at GetAsyncKeyState
RE: Reading Key Down by deAd on 07-31-2006 at 08:48 PM

But that wouldn't tell you when something was typed without it being on a timer (which would be VERY messy).

My suggestion would be to be like HopperLive does; use an external DLL that creates a hidden window. This window registers a system-wide hotkey to itself and processes it when it receives the right message. The window is always open but is invisible.


RE: Reading Key Down by Omnipotence on 07-31-2006 at 08:51 PM

Wow, thats great thanks! However the next problem arises that what could I do to run that when a key is pressed down. The command only runs when it is called. Looping would kill the CPU speed and so I would be looking for a funciton that calls whenever a key is pressed... any idea as to that?

And yes, the other viable opion was that timer. Which again sounds prettyyy messy... external DLL... errr Im not sure I know how to handle that.