#include HotKeySet("!{DEL}", "endScript") HotKeySet("{UP}", "moveUp") HotKeySet("{DOWN}", "moveDown") HotKeySet("{LEFT}", "moveLeft") HotKeySet("{RIGHT}", "moveRight") ;NOTE: If pressing up and down moves the mouse by more than one pixel, then remove the If < 1 statements. Global $x = 0 Global $y = 0 While(1) $pixelColour = PixelGetColor(MouseGetPos(0), MouseGetPos(1)) ToolTip(MouseGetPos(0) & " : " & MouseGetPos(1) & @CRLF & $pixelColour) Sleep(200) WEnd Func moveUp() $x = MouseGetPos(0) $y = MouseGetPos(1) If($y < 1) Then MouseMove($x, ($y - 2), 0) Else MouseMove($x, ($y - 1), 0) EndIf EndFunc Func moveDown() $x = MouseGetPos(0) $y = MouseGetPos(1) If($y < 1) Then MouseMove($x, ($y + 2), 0) $y = $y + 2 MouseMove($x, ($y - 2), 0) Else MouseMove($x, ($y + 1), 0) EndIf EndFunc Func moveLeft() $x = MouseGetPos(0) $y = MouseGetPos(1) MouseMove(($x - 1), $y, 0) $x = $x - 1 If($y < 1) Then MouseMove($x, ($y - 1), 0) EndIf EndFunc Func moveRight() $x = MouseGetPos(0) $y = MouseGetPos(1) MouseMove(($x + 1), $y, 0) $x = $x + 1 If($y < 1) Then MouseMove($x, ($y - 1), 0) EndIf EndFunc Func endScript() Exit 0 EndFunc