Primary Navigation

Quake Console Update Unreliable

Let me start by explaining what I am trying to achieve. Basically the Quake engine has a console window that sits behind it, I believe this to be a child

Message 1 of 9
, Jul 19, 2004

0 Attachment

Let me start by explaining what I am trying to achieve. Basically
the Quake engine has a console window that sits behind it, I believe
this to be a child window. I want to update the console with text
ever 2 seconds.

Current Status - I am able to get text to the console, but it is not
reliable, sometimes all the text arrives, other time bits are
missing. If I click in the main window this screws it up, because I
beleive the main window takes the focus away from the console,
therefore the sendkeys command is sending the letters to the main
window.

Solution Required - I need some way of writing text but be able to
specify what window to put this in.

Any ideas will be greatly received as I am tearing me hair out and I
am sure the solution is quite simple.

Thanks

Chris Hilton

You might try splitting your message into individual keypresses and set the foreground window (or focus window?) before sending each key. Something like the

Message 2 of 9
, Jul 19, 2004

0 Attachment

You might try splitting your message into individual keypresses and set the
foreground window (or focus window?) before sending each key. Something like
the following if it was just regular text:

Let me start by explaining what I am trying to achieve. Basically
the Quake engine has a console window that sits behind it, I believe
this to be a child window. I want to update the console with text
ever 2 seconds.

Current Status - I am able to get text to the console, but it is not
reliable, sometimes all the text arrives, other time bits are
missing. If I click in the main window this screws it up, because I
beleive the main window takes the focus away from the console,
therefore the sendkeys command is sending the letters to the main
window.

Solution Required - I need some way of writing text but be able to
specify what window to put this in.

Any ideas will be greatly received as I am tearing me hair out and I
am sure the solution is quite simple.

Let me start by explaining what I am trying to achieve. Basically
the Quake engine has a console window that sits behind it, I believe
this to be a child window. I want to update the console with text
ever 2 seconds.

Current Status - I am able to get text to the console, but it is not
reliable, sometimes all the text arrives, other time bits are
missing. If I click in the main window this screws it up, because I
beleive the main window takes the focus away from the console,
therefore the sendkeys command is sending the letters to the main
window.

Solution Required - I need some way of writing text but be able to
specify what window to put this in.

Any ideas will be greatly received as I am tearing me hair out and I
am sure the solution is quite simple.

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.

> 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]

Chris Hilton

Yeah, that s what I meant by getVirtualKey() and looking up the constant values left as exercises for the reader . You ll need to write getVirtualKey() to

Message 8 of 9
, Jul 21, 2004

0 Attachment

Yeah, that's what I meant by "getVirtualKey() and looking up the constant
values left as exercises for the reader". You'll need to write
getVirtualKey() to convert letters to virtual keys. You'll also need the
constant values for WM_KEYDOWN, WM_KEYUP, and the virtual key codes (from
winuser.h, I think) and, I would recommend, set them up as constants in your
Perl program.

> 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]

* To visit your group on the web, go to:
http://groups.yahoo.com/group/perlguitest/
<http://groups.yahoo.com/group/perlguitest/>

* To unsubscribe from this group, send an email to:
perlguitest-unsubscribe@yahoogroups.com
<mailto:perlguitest-unsubscribe@yahoogroups.com?subject=Unsubscribe>

* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .

[Non-text portions of this message have been removed]

coolrobd

Back to basic s I am afraid, I have looked into it and just can t figure it out, it just will not work, so now trying to get the calculator to accept keys,

Message 9 of 9
, Jul 21, 2004

0 Attachment

Back to basic's I am afraid, I have looked into it and just can't
figure it out, it just will not work, so now trying to get the
calculator to accept keys, still no joy, check out the attached
code, looks good to me, but does not work. The setting up of the
window works great, its just the SendMessage that does not work.

> 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