Problem fixed, here's the finished code.
SuperStrict Extern "win32" Function GetPixel:Int(hdc:Int, x:Int, y:Int) End Extern Global HDC_DESKTOP:Int = GetDC(0) Local p:Int = dGetPixel(931, 709), r:Int, g:Int, b:Int ApiRGB(p, r, g, b) DebugLog p + "|" + r + ", " + g + ", " + b p = PrepRGB(r, g, b) DebugLog p + "|" + r + ", " + g + ", " + b Function dGetPixel:Int(x:Int, y:Int) Return GetPixel(HDC_DESKTOP, x, y) End Function Function CompareColors:Int(Col1:Int, Col2:Int) If Col1 = Col2 Then Return 1 Else Return 0 End Function Function PrepRGB:Int(Red:Int, Green:Int, Blue:Int) Return Red | Green Shl 8 | Blue Shl 16 End Function Function ApiRGB(Pixel:Int, Red:Int Var, Green:Int Var, Blue:Int Var) Red = (Pixel Shr 0) & 255 Green = (Pixel Shr 8) & 255 Blue = (Pixel Shr 16) & 255 End Function