Loading ...
Sorry, an error occurred while loading the content.

541Re: Quake Console Update Unreliable

Expand Messages
  • coolrobd
    Jul 20, 2004
      Naerly there I think - Just can't get then SendMessage to work. Do
      I need to setup the WM_KEYDOWN?

      Also getVirtialKey does not work - just wondering if you where
      expecting me to knock up the code behind it?

      Cheers for the help.

      --- In perlguitest@yahoogroups.com, Chris Hilton <chilton@n...>
      wrote:
      > I thought about suggesting this before, but it's a good bit more
      > complicated. Trying to keep it as simple as possible, I believe it
      would be
      > something like this:
      >
      > foreach $letter (split(//, $text)) {
      > $vk = getVirtualKey($letter);
      > SendMessage($window, WM_KEYDOWN, $vk, 1);
      > SendMessage($window, WM_KEYUP, $vk, 1);
      > }
      >
      > With getVirtualKey() and looking up the constant values left as
      exercises
      > for the reader. Note that if you want to send a two-key
      combination, like a
      > capital letter for the following example, you'll need to send a
      key down
      > message for the virtual shift key, send your letter, then key up
      the virtual
      > shift key. Here's some URLs that might come in handy.
      >
      > SendMessage:
      > http://msdn.microsoft.com/library/default.asp?url=/library/en-
      us/winui/WinUI
      > /WindowsUserInterface/Windowing/MessagesandMessageQueues/Messagesan
      dMessageQ
      > ueuesReference/MessagesandMessageQueuesFunctions/PostMessage.asp
      > <http://msdn.microsoft.com/library/default.asp?url=/library/en-
      us/winui/WinU
      >
      I/WindowsUserInterface/Windowing/MessagesandMessageQueues/Messagesand
      Message
      > QueuesReference/MessagesandMessageQueuesFunctions/PostMessage.asp>
      > WM_KEYDOWN:
      > http://msdn.microsoft.com/library/default.asp?url=/library/en-
      us/winui/WinUI
      > /WindowsUserInterface/UserInput/KeyboardInput/KeyboardInputReferenc
      e/Keyboar
      > dInputMessages/WM_KEYDOWN.asp
      > <http://msdn.microsoft.com/library/default.asp?url=/library/en-
      us/winui/WinU
      >
      I/WindowsUserInterface/UserInput/KeyboardInput/KeyboardInputReference
      /Keyboa
      > rdInputMessages/WM_KEYDOWN.asp>
      > WM_KEYUP:
      > http://msdn.microsoft.com/library/default.asp?url=/library/en-
      us/winui/WinUI
      > /WindowsUserInterface/UserInput/KeyboardInput/KeyboardInputReferenc
      e/Keyboar
      > dInputMessages/WM_KEYUP.asp
      > <http://msdn.microsoft.com/library/default.asp?url=/library/en-
      us/winui/WinU
      >
      I/WindowsUserInterface/UserInput/KeyboardInput/KeyboardInputReference
      /Keyboa
      > rdInputMessages/WM_KEYUP.asp>
      > Virtual Key Codes:
      > http://msdn.microsoft.com/library/default.asp?url=/library/en-
      us/winui/WinUI
      > /WindowsUserInterface/UserInput/VirtualKeyCodes.asp
      > <http://msdn.microsoft.com/library/default.asp?url=/library/en-
      us/winui/WinU
      > I/WindowsUserInterface/UserInput/VirtualKeyCodes.asp>
      >
      > I think it's a bit of overkill unless you've tried the other way
      and found
      > it lacking, but good luck.
      >
      > Chris Hilton
      >
      > -----Original Message-----
      > From: coolrobd [mailto:coolrobd@y...]
      > Sent: Tuesday, 20 July, 2004 07:22
      > To: perlguitest@yahoogroups.com
      > Subject: [perlguitest] Re: Quake Console Update Unreliable
      >
      >
      > SendMessage is definately the way to go I feel, but how do you
      pass a
      > letter using SendMessage, any syntax would be appreciated.
      >
      > I know you can only send one letter at a time.
      >
      > Thanks in advance!
      >
      > Rob
      >
      >
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
    • Show all 9 messages in this topic