Jump to content
Sign in to follow this  

problem in control send

Recommended Posts


$hWndGame = WinGetHandle( "Insert game window title here")

While 1

$var1 = PixelSearch ( 642, 102, 646, 107, 0x181818, 0, 1, $hWndGame)

$var2 = PixelSearch ( 642, 102, 646, 107, 0xAF8840, 0, 1, $hWndGame)

If NOT ($var1 OR $var2) Then

ControlSend ( "Insert game window title here", "", "", "{o}" )




i asked for help to come up with this code, so i can open game window and internet explorer at the same time and browse.

I never block the game screen while i surf and this code worked!.. well partly...

there is a weird problem.

i use this for automatic health.

when my health is low enough to trigger the code (press o),

it doesn't fill the health.

however, during that time if i open a conversation box in the game, i can see o constantly typing...

so it does work in game but y not actually heal?

Share this post

Link to post
Share on other sites

Try putting this at the top of your code:

Opt("SendKeyDownDelay", 50)

It may just be the case that the button press is too fast for the game to register.

Share this post

Link to post
Share on other sites


ControlSend($hWndGame, "", "", "{o}")

No idea what {o} does ...

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.