alternative to mousecolor to get a color from loc?

Ken Ray kray at sonsothunder.com
Fri May 6 20:16:41 EDT 2011


> I didn't read your post very closely... you wanyed it as a function

You should probably also put the cursor back where it was before you're
done:

function pixelColor x,y
   put the screenMouseLoc into tOldLoc
   put the topLeft of this stack into theLoc
   set the screenMouseLoc  to (item 1 of theLoc + x,item 2 of theLoc + y)
   put the mouseColor into tVal
   set the screenMouseLoc to tOldLoc
   return tVal
end pixelColor

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/






More information about the use-livecode mailing list