CLIPBOARD
Copy the colour of a screen pixel
Trap the menu handler; PG should generate an empty one for copy, just put your string-generation-write-to-TESCRAP stuff in there. (Don't use PG... not sure why edit fns aren't there - but the PG fltrs I've seen had _everything_ at least stubbed out!)
<< Is there a way to eyedrop a pixel from the window of an application other than the one with the eyedropper? >>
Handbook pg 315; but need to set your clip region to the full screen first;
CALL GETPORT(oldPort&)
CALL GETCWMGRPORT(wPort&) 'full screen port
CALL SETPORT(wPort&)
wRect;8 = wPort& + _portRect 'full screen rect
oldRgn& = FN NEWRGN
CALL GETCLIP(oldRgn&) 'store window clip
CALL CLIPRECT(wRect) 'set screen clip
'get your color here - may need LOCALTOGLOBAL & vice-versa on points
CALL SETCLIP(oldRgn&) 'set window clip back
CALL DISPOSERGN(oldRgn&)
CALL SETPORT(oldPort&)
This _should_ work; but no guarantees!
|