[Discuss]ControlSend?

08/08/2010 02:43 Xraveinfinity#1
Does anyone know how to properly use the 'ControlSend' feature of AutoItv3?

I was trying to send hotkeys into the client while it is hidden (@SW_HIDE flag), but apparently nothing happens. :confused: Is it because i don't have a class ID?

code:
WinSetState("Mabinogi","",@SW_HIDE)
sleep(800)
ControlSend("Mabinogi","" ,"" ,"{F2}")

I was thinking how much potential ControlSend has since it can send the key while the program is minimized or hidden so it doesn't disrupt normal activity... but hmm. anyone's two cents is welcomed :D

Xraveinfinity
08/08/2010 05:03 Theri#2
Nothing to discuss, it will never work. Most games intercept special keys, along with other issues. Its a road not worth wasting time on as there's no way to use controlsend or system messages to automate the game while its not the active window.
08/08/2010 17:17 Xraveinfinity#3
Ahh. I found a way around it though :P

by having it SW_Hide, i can then call, before the function, WinActivate() on Mabinogi, and then follow it with a quick Send() or any Mouse action. and then if I WinSetState(@SW_minimize)... no one would ever know anything occured. The window is still hidden.

However, since every mouseclick and keyboard action i do in that space of a couple of seconds will be sent to mabi, I recommended someone to start-up a full-screen chatbox with a friend or something to avoid mouseclicks and hopefully keyboards too. (the Enter key would cause problems though if someone accidentally typed that.)