I am Trying to write a skill trainer in C# to avoid physical keyjamming. The idea is to be able to level heals and buffs by selecting any player with an open stall in town and then have the program go into a cycle of applying skills, buffs and regenerate VE; i.e. software-keyjamming

.
The idea would be very similar to keyjamming: I would have a simple program "type" numbers for the skills I want to raise and "P" after a set period of time to regenerate OR I could toggle in and out of combat mode and have my satchets raise VE before the next spell is cast. That's it, it's the heals and buffs I want to raise; the fighting skills, gold, and dropped objects are part of my gaming experience, don't care to hack those (but heals and buffs take FOREVER and I do want my healer character to be of real help in parties)
Does anybody know why functions like SendKeys, SendMessage or SendInput won't work on 9Dragons. Better still, does anybody know HOW to make them work?
Spy++ tells me that 9Dragons gets a WM_Keydown, WM_Char, WM_Keyup with every key stroke. That is, whenever I type a character like "1" for example while 9Dragons is active, 9Dragons receives three messages: WM_Keydown, WM_Char,WM_Keyup
If I try SendKeys, I get an error with 9Dragons that I assume is because 9Dragons wont accept messages from a third program (I didn't bother with sendmessage because I assume it will fail for the same reason).
I tried SendInput which I understood emulated a keyboard stroke as if it were coming from the keyboard. SendInput works perfect but not for 9Dragons: I wrote a short "Hello World" timed routine and started up several windows of Notepad, Explorer, Word, etc. SendInput would send the keystrokes and depending on what window was currently active, that window would receive the text as if it where typed. However, SPY informs me that what Notepad received was a series of WM_Command messages and WM_CtlColorEdit (the text was received and printed ok). MS Word prints the words, but Spy doesn't seem to be able to capture any message and Explorer captures the text through a WM_NULL command. So all of this is saying is that I am ignorant when it comes to the way SendInput really emulates a keystroke and/or the ways that programs capture the keystroke. (By the way, the keystrokes that come from the keyboard generate the same response from SPY so I assume that SendInput is doing it's job).
9Dragons, however, ignored the keystrokes generated by Sendinput completely. My "Hello World" was sending a letter P spaced 4 seconds apart. I got the program running; made sure it was issuing the P's by looking in Notepad for the capture; then selected 9Dragons and typed in a "1" command (a skill) to make sure that 9Dragons was responding to the keyboard. waited, waited what should have been at least four P's then typed in another "1" command. Sure enough, I could see my two "1" commands on SPY, but no P commands.
My assumption is that SendInput is to high level and that the keyboard strokes are intercepted by another program at a lower level (as of yet unidentified by me) who then Sends a Message to 9Dragons and that 9Dragons accepts this message because it comes from an authorized source (presumable game guard).
I was wondering if you guys can comment on these assumptions and help me create a good soft-keyjammer.
ppp
Thanks