I need some C# help.

03/25/2010 15:36 ChewieBacon#1
Does anyone have a working code to send keystroke to 12Sky2?

I have tried SendMessage, PostMessage, SendInput, and a few low level keyboard hooks. I just can't seem to get it working.
03/25/2010 19:20 Iktov#2
Megabyte is great with C#.
03/25/2010 22:43 Mega Byte#3
Well theres several ways...
Ide probably just use keyboard simulation globally or sending it straight to the window handle of 12sky2. Another way is to inject a dll into 12sky2 and call the code for managing a keypress and just pass what key :P A better way for if you just want to spam stuff like skills aoe etc is to call that code using an injected dll. Im working on a way to have a C# gui comunicate with an injected dll coded in C++ which handles hooks and the likes.

Suppose we could collobrate or something although I think you already have SendKeys working :D

Links that may help :)
[Only registered and activated users can see links. Click Here To Register...]

From MSDN
Quote:
Because there is no managed method to activate another application, you can either use this class within the current application or use native Windows methods, such as FindWindow and SetForegroundWindow, to force focus on other applications.
I think I read somewhere you can send a windows message to that window handle so I will try to do this sometime soon :)

[Only registered and activated users can see links. Click Here To Register...]

Maybe this will provide more information
[Only registered and activated users can see links. Click Here To Register...]

Try with findwindow handle api :D