#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=C:\Users\user\Desktop\PGCAH2.0.Exe #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include Opt("GUIOnEventMode", 1) Opt("WinTitleMatchMode", 4) Global $xoffset = 10;X axis distance from mouse pointer to blue label Global $yoffset = 23;Y axis distance from mouse pointer to blue label Global $wposx, $wposy, $dt, $cwin, $xcalcl, $xcalcr, $ycalc, $cpos, $pos, $tpos, $hexv, $pcolor Global $title = "Your Title Here" HotKeySet("{ESC}", "Terminate") $pgui = GUICreate($title, 250, 13, -1, -1, $ws_popup);Rear place holder for back of the blue label box (Title, Length of the blue lable box, Height of the blue label box,,) $startlab = GUICtrlCreateLabel(" X: 0000, Y: 0000", 0, -1080, 250, 13) GUICtrlSetBkColor($startlab, 13434879);blue label box color WinSetOnTop($pgui, "", 1) GUISetState(@SW_SHOW) While 1 _nmgp() WEnd Func _nmgp() Local $_cpos = MouseGetPos();get current position of the mouse on desktop Sleep(10) $pcolor = PixelGetColor($_cpos[0], $_cpos[1]);help $pos = MouseGetPos() GUICtrlSetData($startlab, " X: " & $pos[0] & ", Y: " & $pos[1] & " HEX: " & Hex($pcolor, 6) & " DEC: " & $pcolor) ;************************************ Moves the blue label with the mouse ***************************** If $dt = 1 Then $xcalcr = 0.95 * @DesktopWidth $xcalcl = 0.05 * @DesktopWidth $ycalc = 0.9 * @DesktopHeight If $pos[1] > $ycalc Then $wposy = $pos[1] - $yoffset * 2 Else $wposy = $pos[1] + $yoffset EndIf If $pos[0] > $xcalcr Then $wposx = $pos[0] - $xoffset * 3 ElseIf $pos[0] < $xcalcl Then $wposx = $pos[0] + 10 Else $wposx = $pos[0] - $xoffset EndIf Else _clientmouse() EndIf WinMove($title, "", $wposx, $wposy) ;************************************ End Moves the blue label with the mouse *************************** EndFunc Func _clientmouse() Opt("MouseCoordMode", 1) $tpos = MouseGetPos() $cpos = WinGetPos($cwin) $xcalcr = 0.95 * $cpos[2] $xcalcl = 0.95 * $cpos[2] $ycalc = 5.0 * $cpos[3];Y axis for offsetting the text box when you reach the top of the screen (so you can stil see the coordinates) If $tpos[1] > $ycalc Then $wposy = $tpos[1] - $yoffset * 2; Y Axis to determine the distance from the mouse pointer and the blue text box Else $wposy = $tpos[1] + $yoffset EndIf If $tpos[0] > $xcalcr Then $wposx = $tpos[0] - $xoffset - $xcalcr ; X Axis to determine the distance from the mouse pointer and the blue text box ElseIf $tpos[0] < $xcalcl Then $wposx = $tpos[0] + 10 Else $wposx = $tpos[0] - $xoffset EndIf EndFunc Func terminate() Exit 0 EndFunc