Jump to content

checking x and y


Tomb
 Share

Recommended Posts

i am trying to make a check for x and y coordinates for a control in a script, but what i have doesnt seem to work. if x is at 10 and y is at 10, i want a message box to come up.

If $GetPos[0] = 10 & $GetPos[1] = 10 then 
MsgBox(0, "Window Stats:", "POS: " & $pos[0] & "," & $pos[1])
EndIf
Link to comment
Share on other sites

so could i do this and it work?

If $GetPos[0] = 10 and $GetPos[1] = 10 then 
MsgBox(0, "Window Stats:", "POS: " & $pos[0] & "," & $pos[1])
EndIf

im not sure but i think saying $GetPos = something isnt working. although if i do $GetPos > 10 it seems to. what is causing this.

Edited by Tomb616
Link to comment
Share on other sites

This might help

#include <AutoitInfo.au3>

; Set option
Opt("MouseCoordMode", 1)        ;1=absolute, 0=relative, 2=client

; Get mouse position / looped
While GUIGetMsg() <> -3
    $GetPos = MouseGetPos()
    _AutoitInfoDisplay($GetPos, "MouseGetPos", 2)
    If $GetPos[0] = 10 and $GetPos[1] = 10 then
    MsgBox(0, "Window Stats:", "POS: " & $GetPos[0] & "," & $GetPos[1])
    EndIf
    Sleep(10)
WEnd

AutoitInfo.au3 located here...

http://www.autoitscript.com/forum/index.ph...st&p=446841

8)

8)

NEWHeader1.png

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...