PDA

View Full Version : Send Input to Halo 2 Vista in C#



Sprt4n117
September 12th, 2007, 08:09 PM
Hello, for all you C# programmers out there, ive got a question that i need answered.

I want to stimulate the mouse and keyboard. I know a few methods to do this but for some reason, they dont seem to work while im playing h2v.

So far, the only method that has worked is the SendKeys.Send function. unfortunately, SOMETIMES the game misses it and it ackts like if the function was never even used. I think this is becuase the function presses and lets go of the key way to fast before it evens give time for the game to detect it.

for example, if i press SendKeys.Send("f"); the game should punch...right? well sometimes it does and sometimes it doesnt. i found out that if i do SendKeys.Send("fffffffffffffffffffffffffff"); i have a greater probability of puching, but it still isnt enough to make it punch 100% of the time.

Is there a way to wait a while before the SendKeys.Send lets go of the button pressed? Is there a better way to send input that will work with directx games? If you have a way to do this in C++ that also works with h2v, feel free to post it also, I dont mind switching to C++ as long as it works

all help is appreciated

Con
September 12th, 2007, 08:50 PM
I was using SendKeys with H2V a while ago as well, except in VB. It only seems to affect the ingame chat console if it's open. If anyone's got a better way, I'd also love to hear about it.

Sprt4n117
September 12th, 2007, 09:31 PM
I noticed that it worked on the chat too.

(lol, i was pretty mad and asking myself "Why the hell wont it work for gameplay!!!!?")

Vicky
September 13th, 2007, 09:44 AM
One question: why would you want to simulate key-pressing?

Chromide
September 13th, 2007, 11:32 AM
One question: why would you want to simulate key-pressing?

if someone could send key strokes in game play they could simulate a bxr or what ever its called so that they get it every time with only one click. in my opinion it would be a hack but that could be one use for why someone would want to be able to.

Prey
September 13th, 2007, 11:52 AM
Well you could always use the wait method: "SendKeys.SendWait("f");"

Also, there is a much more effective way of sending lots of the same letter: "SendKeys.SendWait("f 100");"..with the number representing the number of repeats.

MSDN Goes Into More Detail (http://msdn2.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx).

Patrickssj6
September 13th, 2007, 12:29 PM
Don't sent the keys...let windows press it...for mouse clicks I have the source somewhere...if you do use the send key function don't forget to...

System.Threat.Threating.Sleep(100)

If you let the program sleep for a few milliseconds the send key function works way better :)

Kornman00
September 13th, 2007, 01:03 PM
System.Threat.Threating.Sleep(100)


fucking system threats....

Sprt4n117
September 13th, 2007, 07:39 PM
One question: why would you want to simulate key-pressing?I am currently working on an app that will auto-butterfly and auto-rocket-sword-cancel

System.Threat.Threating.Sleep(100)

If you let the program sleep for a few milliseconds the send key function works way better :)I think you mean System.Thread.Threading.Sleep(number_of_millisecon ds);

but i have a question, what does this do? I know it stops the program from what ever its doing, but does this mean that if i use it after the SendKeys.Send() function, it will hold down the key longer before letting go?

there is a much more effective way of sending lots of the same letter: "SendKeys.SendWait("f 100");"..with the number representing the number of repeats.I found no difference using the SendKeys.SendWait() function

btw, you forgot the brackets...its supposed to be SendKeys.Send("{f 100}");


fucking system threats....LOL:D

Vicky
September 13th, 2007, 08:51 PM
I am currently working on an app that will auto-butterfly and auto-rocket-sword-cancel

Butterflies:confused2: Rockets-swords:confused2: Either i'm on the wrong drugs or do we share the same H2V?

Con
September 13th, 2007, 09:25 PM
Butterflies: repeating melee lunge canceling (hitting melee then reload causes the melee to deal no damage, but you still lunge)
It's used on a person repeatedly jumping on your head. The two of you will start floating up into the air, bobbing up and down like a butterfly. You can go as high as you want, except it's tough on the fingers and if you mess up you can kill the person above you accidentally. That's why it's a great idea to make an app to do it for you.

As for the rocket-sword-canceling, that doesn't work in H2V. Don't waste your time trying to make the application do it.

Sprt4n117
September 13th, 2007, 10:16 PM
As for the rocket-sword-canceling, that doesn't work in H2V.
Try it before you say it doesn't work. I've done it plenty times in h2v (although it takes me forever)
Thats why i want to make this app for auto-rocket-sword-canceling, because it takes me forever to do it

BTW: to rocket-sword-cancel
-make sure you have rocket-launcher and sword as your two weapons
-make sure you have no ammo for rocket-launcher
-look at the person you want to rocket-sword-cancel from and make sure it turns red
-press X+B+Y+R (on 360 controller) repeatedly until you go flying toward the person

Con
September 14th, 2007, 01:01 AM
Try it before you say it doesn't work. I've done it plenty times in h2v (although it takes me forever)
Thats why i want to make this app for auto-rocket-sword-canceling, because it takes me forever to do it

BTW: to rocket-sword-cancel
-make sure you have rocket-launcher and sword as your two weapons
-make sure you have no ammo for rocket-launcher
-look at the person you want to rocket-sword-cancel from and make sure it turns red
-press X+B+Y+R (on 360 controller) repeatedly until you go flying toward the person
Oh, I was trying it and couldn't get it to work. I didn't know you needed no ammo.

Patrickssj6
September 14th, 2007, 08:00 AM
fucking system threats....
>.>

Mannheim isn't far away....then I'll be your threat.

Vicky
September 14th, 2007, 09:04 AM
Didn't know those tricks, nice... i'll try them out myself.

Kiyoshi
September 14th, 2007, 11:06 AM
Wow when I first read what we was using it for I thought about Gunz online. Freakin crazy game, jammed my finger once playing it.

Pooky
September 14th, 2007, 04:40 PM
-press X+B+Y+R (on 360 controller)
What does that translate to using mouse and keyboard?

(before anyone tells me how stupid I am, H2V uses both E and R to collectively do the things X did in HAlo 2 Xbox)

Prey
September 14th, 2007, 04:57 PM
Oops forgot about the brackets^^, my apologies.


What does that translate to using mouse and keyboard?

(before anyone tells me how stupid I am, H2V uses both E and R to collectively do the things X did in HAlo 2 Xbox)

X - Reload
B - Melee
Y - Change Weapon
R - Shoot

If that is what you wanted?

leorimolo
September 14th, 2007, 05:48 PM
They are glitches