Jump to content

SLeeptime Or Pixel Colour


 Share

Recommended Posts

Find a rectangle where something changes. Use AutoIt Window Info Tool to find the coordinates.

You need to use

PixelCheckSum
to detect the change that occurs when your games starts. To make it "detect" the change you need to compare what the sum was before so that when it changes it has something to compare it to.

Here is a basic example (non-functional) on how to do so.

$precheck = PixelCheckSum(25, 25, 50, 50) ;This is the sum of all the pixels in a 25 by 25 square.
Do ;starts a loop
$postcheck = PixelCheckSum(25, 25, 50, 50) ;This gets another sum of the same area of pixels
Sleep(50) ;50ms break
Until $precheck <> $postcheck ;This will cause the loop to end when the 25 by 25 pixel region is different than it was when the script started
;Now you can drop whatever code you want down here guy
Edited by jebus495
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...