Jump to content

Recommended Posts

Posted (edited)

Hey guys, I've came across a problem with pixel detection. What I'm trying to do is say for example a health bar in a game. As it goes down to a certain point it stops its current task and clicks. Here's a code of what i thought up:

Func Bar()
While 1
    $seach = PixelSearch(402, 194, 417, 193, 0xC31515, 2, 2)
    MouseClick("left", $left[0], $left[1])
WEnd
EndFunc
Edited by Clipper34
Posted

the problem is how do i get the program to stop what it's doing when a certain event happens in the window/program and do something else. For example to send a mouse click when, like i said above a health bar IF it reaches a certain amount the program stops and peforms a mouse click. Any ideas where to start? Thanks.

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
×
×
  • Create New...