Good news, I found the solution. Limited suggested I use SendInput instead.
you'll need these
Code:
INPUT structInput = new INPUT();
structInput.mkhi.ki.wScan = (ushort)0x11;
structInput.mkhi.ki.time = 0;
structInput.mkhi.ki.dwFlags = KEYEVENTF_SCANCODE;
structInput.mkhi.ki.wVk = 0;
structInput.type = INPUT_KEYBOARD;
SendInput(1, ref structInput, Marshal.SizeOf(new INPUT()));
Here's a list of key codes.
EDIT: success!
HaloBot has just walked from one side of bloodgulch to the other following the paths perfectly. You can even look around while it does this; it calculates the right combination of WASD to use based on the angle you're looking and where the goal is.
Bookmarks