|
-
Jan 3rd, 2004, 11:09 PM
#1
Thread Starter
Hyperactive Member
-
Jan 4th, 2004, 02:20 AM
#2
-
Jan 4th, 2004, 04:42 AM
#3
Hyperactive Member
Use SendKeys.
System.Windows.Forms.SendKeys
Use SendKeys to send keystrokes and keystroke combinations to the active application.
Each key is represented by one or more characters. To specify a single keyboard character, use the character itself. For example, to represent the letter A, pass in the string "A" to the method. To represent more than one character, append each additional character to the one preceding it. To represent the letters A, B, and C, specify the parameter as "ABC".
The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses () have special meanings to SendKeys. To specify one of these characters, enclose it within braces ({}). For example, to specify the plus sign, use {+}. Brackets ([ ]) have no special meaning to SendKeys, but you must enclose them in braces. To specify brace characters, use {{} and {}}.
---- see MSDN
-
Jan 4th, 2004, 11:07 AM
#4
Fanatic Member
is it possible
that the program in question that you are trying to send your simulated key presses to is not currently in focus during the routine?
-
Jan 4th, 2004, 02:13 PM
#5
Thread Starter
Hyperactive Member
Re: Well ...
Originally posted by honeybee
Did you try SendKeys?
.
yes, doesnot work
-
Jan 4th, 2004, 02:14 PM
#6
Thread Starter
Hyperactive Member
Originally posted by sw_is_great
Use SendKeys.
System.Windows.Forms.SendKeys
Use SendKeys to send keystrokes and keystroke combinations to the active application.
---- see MSDN
thanks, however, I am using VB6. I'll try .NET
-
Jan 4th, 2004, 02:15 PM
#7
Thread Starter
Hyperactive Member
-
Jan 4th, 2004, 03:06 PM
#8
Fanatic Member
how do you go about
setting focus to the program in question?
-
Jan 4th, 2004, 03:28 PM
#9
Thread Starter
Hyperactive Member
Re: how do you go about
Originally posted by TokersBall_CDXX
setting focus to the program in question?
my program is supposed to run at the background and send key strokes to the foreground program which is a game and using DirectX for graphics.
so, the focus must be on the game, not my program.
-
Jan 4th, 2004, 06:10 PM
#10
Are you certain DirectX is letting the keybd_event calls execute and process?
Still, DirectInput might somehow be the culprit, although that would be a bit odd.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Jan 4th, 2004, 06:40 PM
#11
Thread Starter
Hyperactive Member
Originally posted by jemidiah
Are you certain DirectX is letting the keybd_event calls execute and process?
Still, DirectInput might somehow be the culprit, although that would be a bit odd.
Yes, DX should let keybd_event calls execute and process. I tested it on another game, it is ok. It is weird that it does not work on current game.
I searched google, another guy had this problem too. He said that he overcame this problem by installing a debug version of DX8, then it is ok. Also, all the works were on WinXP. And he had no problem on Win2k at all. It is weird, isn't it?
I guess it is because of DX or WinXP?
BTW, where I can donwload debug version of DX8? Can not find it on Microsoft.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|