Sign in to follow this  
Followers 0
windowshopr

setting coordinate variables?

5 posts in this topic

I am using multiple checksums at the start of a sequence, then it looks for differences after a few seconds of the sequence. What I am looking to do is get the coordinates for where the differences happened. Is this possible? I was thinking EnvGet but I am not sure what that does or if it's even relevant to what I am trying to do but thought I'd ask. I guess the biggest question I have, as I am clutching my head, is if it is at all possible to turn coordinates into a variable allowing me to loop the script so I can keep the same sequence going.

Long story short:

1: Get initial checksums

2: Sleep for 16 seconds (as the sequence finishes)

3: If the initial checksum has changed, get the coordinates on the screen to where it changed

That would be great start, and if it's at all possible to turn coordinates to a variable, that would be perfect.

???????????????????????????????????????????????????????????????????

ex. $var = (coordinates gathered from previous checksum comparisons)

MouseClick ("left" $var)

???????????????????????????????????????????????????????????????????

Any help is greatly appreciated

Share this post


Link to post
Share on other sites



Can we see your code work?


Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Share this post


Link to post
Share on other sites

We are not sure what you are trying to do, but i think you want to move either a window or a control driven by positions / states.

use the helpfile from autoit, that's why i almost never post questions.

For windows

WinGetPos ( "title" [, "text"] )

WinGetState ( "title" [, "text"] )

for controls

ControlGetPos ( "title", "text", controlID )

GUICtrlGetState ( [controlID] )

Share this post


Link to post
Share on other sites

We are not sure what you are trying to do, but i think you want to move either a window or a control driven by positions / states.

use the helpfile from autoit, that's why i almost never post questions.

For windows
WinGetPos ( "title" [, "text"] )
WinGetState ( "title" [, "text"] )

for controls
ControlGetPos ( "title", "text", controlID )
GUICtrlGetState ( [controlID] )

Share this post


Link to post
Share on other sites

here is the code i'm working with right now. I haven't had the time to check for coordinates but each checksum will be a different area of the window so ignore that for now:

; Get initial checksums. checksum1 is the number 0 and checksum2 is 1...

$checksum1 = PixelChecksum(360, 386, 790, 650)

$checksum2 = PixelChecksum(360, 386, 790, 650)

$checksum3 = PixelChecksum(360, 386, 790, 650)

$checksum4 = PixelChecksum(360, 386, 790, 650)

$checksum5 = PixelChecksum(360, 386, 790, 650)

$checksum6 = PixelChecksum(360, 386, 790, 650)

$checksum7 = PixelChecksum(360, 386, 790, 650)

$checksum8 = PixelChecksum(360, 386, 790, 650)

$checksum9 = PixelChecksum(360, 386, 790, 650)

$checksum10 = PixelChecksum(360, 386, 790, 650)

$checksum11 = PixelChecksum(360, 386, 790, 650)

$checksum12 = PixelChecksum(360, 386, 790, 650)

$checksum13 = PixelChecksum(360, 386, 790, 650)

$checksum14 = PixelChecksum(360, 386, 790, 650)

$checksum15 = PixelChecksum(360, 386, 790, 650)

$checksum16 = PixelChecksum(360, 386, 790, 650)

$checksum17 = PixelChecksum(360, 386, 790, 650)

$checksum18 = PixelChecksum(360, 386, 790, 650)

$checksum19 = PixelChecksum(360, 386, 790, 650)

$checksum20 = PixelChecksum(360, 386, 790, 650)

$checksum21 = PixelChecksum(360, 386, 790, 650)

$checksum22 = PixelChecksum(360, 386, 790, 650)

$checksum23 = PixelChecksum(360, 386, 790, 650)

$checksum24 = PixelChecksum(360, 386, 790, 650)

$checksum25 = PixelChecksum(360, 386, 790, 650)

$checksum26 = PixelChecksum(360, 386, 790, 650)

$checksum27 = PixelChecksum(360, 386, 790, 650)

$checksum28 = PixelChecksum(360, 386, 790, 650)

$checksum29 = PixelChecksum(360, 386, 790, 650)

$checksum30 = PixelChecksum(360, 386, 790, 650)

$checksum31 = PixelChecksum(360, 386, 790, 650)

$checksum32 = PixelChecksum(360, 386, 790, 650)

$checksum33 = PixelChecksum(360, 386, 790, 650)

$checksum34 = PixelChecksum(360, 386, 790, 650)

$checksum35 = PixelChecksum(360, 386, 790, 650)

$checksum36 = PixelChecksum(360, 386, 790, 650)

$checksum37 = PixelChecksum(360, 386, 790, 650)

; Wait 16 seconds for the regions to change

Opt("PixelCoordMode", 2)

Sleep (16000)

mousemove (0, 0, 0)

If

$checksum1 <> PixelChecksum(360, 386, 790, 650) Then

If

$checksum2 <> PixelChecksum(360, 386, 790, 650) Then

.....................

Now here is where i want the script to get the x y coordinates of where the change happens, and turn the coordinates into a variable so I can run this whole program over and over again, where it will see if the checksums change and if they do, to get the coordinates to where the change happened. hope that's clearer

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