Originally Posted by
chronic24
whats best way to edit it to 1600x900
This is a great tool I found that pops open a GUI that maps the X and Y and color of where your mouse is at all times. so just move your mouse copy down coordinates.
Code:
; include some constants we use, like $GUI_EVENT_CLOSE or $WS_EX_TOOLWINDOW
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
; Create a GUI window
; title will be 'Cursor nfo'
; width = 160, height = 40. The two -1 means the window will be centered on screen (this is AutoIt's doing,
; it's like we haven't specified WHERE we want the window exactly, so it just puts it in the middle)
; $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST - these are two constants - variables with predefined values, that
; tell the GUI to draw a windows with small border and always on top
GUICreate("Cursor nfo", 160, 40, -1, -1, -1, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
; Create two labels, don't worry about text being empty for now, the reset is left, right, width, height
$label1 = GUICtrlCreateLabel("", 5, 5, 150, 15)
$label2 = GUICtrlCreateLabel("", 5, 20, 150, 15)
; helper variables, storing last known cursor position and color
$ox = -1
$oy = -1
$oc = -1
; show our GUI window
GUISetState(@SW_SHOW)
; In Infinite Loop do
While True
; check GUI Messages (what windows sends to us) for possible events
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE ; in the event user click the close button
Exit
EndSwitch
; call function MousePos
MousePos()
; sleep for 25ms, this is here just so we don't read the cursor every processor tick
Sleep(25)
WEnd
; Function that reads the cursor
Func MousePos()
; get the mouse cursor position, absolute
$pos = MouseGetPos()
; get pixel color
$col = PixelGetColor($pos[0], $pos[1])
; if anything changed (i.e. any saved value is not the same as current value)
If ($ox <> $pos[0] OR $oy <> $pos[1] OR $oc <> $col) Then
; save the current value
$ox = $pos[0]
$oy = $pos[1]
$oc = $col
; update the labels with the current readings
SetLabels($pos[0], $pos[1], $col)
EndIf
EndFunc
; set label text
Func SetLabels($x, $y, $col)
; construct the text
$textPos = "Mouse pos x:" & $x & " y:" & $y
$textCol = "Color: " & Hex($col, 6)
; set the text to the labels
GUICtrlSetData($label1, $textPos)
GUICtrlSetData($label2, $textCol)
EndFunc