Jump to content

Finding Co-ordinates for Windows


AutoAl
 Share

Recommended Posts

Hi All,

I created 2 little scripts which finds the Co-ordinates which could help with

MouseMove, MouseClick, ControlClick

The first script I found is most useful for MouseMove/Click.

(Take into consideration that the first script I am showing you looks at the Co-ordinates for your screen resolution)

--------------- First Script ---------------

Do
$location=MouseGetPos()
$x_current= $location[0]
$y_current= $location[1]
$button_x = $x_current
$button_y = $y_current
ToolTip($button_x&","&$button_y)
Until 1=2

--------------- End Script ---------------

The next script looks for Co-ordinates in the specified Window that you provide using

InputBox
I found this script is extremelly useful for ControlClicks!

--------------- Last Script ---------------

$title=InputBox("Enter Window Title","Type the specific window title you want to find Co-ords for. DO NOT LEAVE THIS BLANK OR YOU WILL GET FALSE CO-ORDINATES!")
Do
$win_pos= WinGetPos($title)
$x = $win_pos[0]
$y= $win_pos[1]
$location=MouseGetPos()
$x_current= $location[0]
$y_current= $location[1]
$button_x = $x_current - $x
$button_y = $y_current - $y
ToolTip($button_x&','&$button_y)
Until 1 = 2

--------------- End of Scripts ---------------

Hope this helps anyone.

Al.

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