Sign in to follow this  
Followers 0
Zithen

pixlechecksum for 2 areas

5 posts in this topic

sorry if this was posted somewhere else tried looking didnt see it...

i have looked at the example for pixlechecksum and it covers for one area, how can u make it search 2 areas at the same time, so it would search 0,0,50,50 and 100,100,50,50 and if anything changes in both areas it would stop the script.

Share this post


Link to post
Share on other sites



sorry if i confuse you i am terible for explaining thing...

pulling from the example in the help file. am trying to do the same thing but with 2 different areas. so there would be a $checksum1 and $checksum2 and it would check both reagons at the same time. so if you move the mouse in reagon one it would do a message mouse in reagon 1 and if you move the mouse in reagon 2 it would say mouse in reagon 2.

so scanning changes in 2 areas..i am unsure on how to write the while statment i guess is the easiest way to explain what i am thinking

$checksum1 = PixelChecksum(0,0, 50,50)

$checksum2 = PixelChecksum(10,100, 50,50)

While $checksum = PixelChecksum(0,0, 50, 50)

Sleep(100)

WEnd

Share this post


Link to post
Share on other sites

...so if you move the mouse in reagon one it would do a message mouse in reagon 1...

<{POST_SNAPBACK}>

I do not think that PixelChecksum can "see" the mouse. If you want to detect the mouse in a region, then look at the MouseGetPos functions and related functions.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

sorry if this was posted somewhere else tried looking didnt see it...

i have looked at the example for pixlechecksum and it covers for one area, how can u make it search 2 areas at the same time, so it would search 0,0,50,50 and 100,100,50,50 and if anything changes in both areas it would stop the script.

<{POST_SNAPBACK}>

This code below is the example in Autoit help file , I just add some stuff.

; Get initial checksum

$checksum_1 = PixelChecksum(0,0, 50,50)
$checksum_2 = PixelChecksum(50,50, 100,100)

; Wait for both regions to change at the same moment(allow one of two regions to change), the regions are checked every 100ms to reduce CPU load

While $checksum_1 = PixelChecksum(0,0, 50, 50) or $checksum_2 = PixelChecksum(50,50, 100,100)

  Sleep(100)

WEnd

MsgBox(0, "", "Something in both regions have changed!")
Edited by nekokk

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