Sign in to follow this  
Followers 0
chrisrulz

SLeeptime Or Pixel Colour

3 posts in this topic

hi, atm i am useing Sleep time to start my Race but it isent the same all the time when it starts off, will it be for Acurate when the green light pops up it goo's.

,,,thx..

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

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

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  
Followers 0