GlovePIE:Get Pixel

From WiiLi

Jump to: navigation, search


ONLY WORKS ON 0.29, NOT 0.3!

// Get Pixel
// by Carl Kenner
// This script retrieves the color of the pixel beneath the mouse cursor, but it
// can easily be modified to check the color of a pixel at a static location.

var.hdc = USER32.DLL.GetDC(NULL)
var.pixel = GDI32.DLL.GetPixel(var.hdc, Int(mouse.CursorPosX), Int(mouse.CursorPosY))
USER32.DLL.ReleaseDC(NULL, Int(var.hdc))
debug = '0x'+IntToHex(var.pixel, 6)
Personal tools