08-13-2006, 05:41 PM
Try this. Once you start the macro it waits for you to press enter to allow you set up your windows. After pressing enter, anytime you press the left mouse button it copies the color to the clipboard and to "out". I wouldn't leave it running all the time though, it uses quite a bit of the CPU resources (~10% on mine).
str MouCol
int mx my omx omy sy sx ocol
sy=ScreenHeight
sx=ScreenWidth
wait 0 KF Y
;
,
rep
,mx=xm
,my=ym
,if(mx+100 > sx)
,,omx=mx-50
,else
,,omx=mx+20
,if(my+30 > sy)
,,omy=my-20
,else
,,omy=my+20
,if((xm=sx-1 && ym=sy-1 ))
,,end
,MouCol.format("0x%X" pixel(xm ym))
,ocol=pixel(omx omy)
,ocol=!ocol
,OnScreenDisplay(MouCol 0.07 (omx) omy "" 8 ocol )
,OnScreenDisplay(MouCol 0.07 (omx+1) omy+1 "" 8 0x000001)
,ifk( (1))
,,out MouCol
,,MouCol.setclip
,,
,rep
,,ifk-((1))
,,,break
,0.05
,
Matt B
