Sending Keystrokes to background-window

04/10/2014 20:25 flatter83#1
Hi,

i'm trying to build a simple bot for aura kingdom, that is able to send keystrokes, but i'm lacking in Auto-it and general programming-skills.

I've tried the ControlSend-command but thats just sending Strings not keystrokes.

I've tried the Send-command, but that just works if the game is in focus.

Any help or useful hint would be nice.

TIA flatter
04/10/2014 20:47 alpines#2
Did you try to send "{w}" instead of "w"? Because "{w}" are keystrokes and "w" is a string.
04/10/2014 21:01 flatter83#3
tried that already. the result is that it sends keystrokes, but they don't activate any skill of my char, but when i have the ingame chat in focus, the numbers are shown.

Code:
Local $hWnd = WinGetHandle("Aura Kingdom Online")
ControlSend ( $hWnd, "", "", "{6}")
04/10/2014 21:32 alpines#4
Why don't you hold down the key (I think "{6 down}" ?) and release it with "{6 up}" after a half second. It can work - but maybe it won't.
04/10/2014 22:50 flatter83#5
that was one thing i thaught of too, so i added
Code:
Opt("SendKeyDownDelay", 500)
it's still the same.
04/10/2014 23:01 alpines#6
Try to do it via SendMessage / PostMessage, it looks difficult for the first time but it'll probably fix your problem.
04/10/2014 23:28 flatter83#7
that was my next step.

right now im downloading a program to readout the parameters that are sent while pressing a key to get to know what i need to fill in.

pls correct me if that way probably isn't going work