mouseColor

Want to talk about something that isn't covered by another category?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

mouseColor

Post by richmond62 » Thu Jan 16, 2014 10:26 pm

People have been finding that mouseColor does not seem to work with 6.5.1 on Windows.

Here's a test stack so everybody can "have a bash" on as many operating systems as possible and report back.

It does work on UbuntuStudio Linux 13.10.
mouseColorTest.rev.zip
Here's the stack
(30.02 KiB) Downloaded 218 times

PBH
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 129
Joined: Sun Feb 20, 2011 4:26 pm
Location: Vancouver Island, BC, Canada. ex.UK
Contact:

Re: mouseColor

Post by PBH » Thu Jan 16, 2014 11:41 pm

Richmond, this is what I have found so far:

Not working: Win 7 (under Parallels 8) / LC6.5.1 - mouseColor reports "0,0,0" regardless of the colour under the mouse pointer.

Almost working: Mac OS X 10.8.5 / LC 6.5.1 (rc2) - mouseColor reports the "Display Native Values" (or screen colour) of whatever is under the mouse pointer, but this is different to the "Native Object Colour" of the object below the mouse pointer. e.g. For a graphic with a fill of "255,0.0" mouseColor reports "253,0,23" on my system using the standard iMac screen profile, the value changes depending on the screen profile applied in the system preferences.

Working: Mac OS X 10.7.5 / LC 6.5.1 (rc2) - mouseColor reports the "Native Object Colour" of whatever is under the mouse pointer regardless of the screen profile.

Also be aware that changing the pixelScale can break mouseColor, bug reported.

I don't have any Linux machines, although I am tempted to dig out my old G4 and try that someday, just not too sure it's worth all the effort right now.

Paul

capellan
Posts: 654
Joined: Wed Aug 15, 2007 11:09 pm

Re: mouseColor

Post by capellan » Sun Jan 19, 2014 1:45 am

Hi Richmond,

Your mouseColor test stack works fine under
LiveCode 6.5.1 on Lubuntu Linux.

I just made a small change:

1) Add a vector graphic (for example, a circle)
on the card and set the opaque of this vector
graphic to true

2) Change card script to:

on mouseDown
put the mouseColor into tColor
put tColor into fld "numm"
set the backcolor of last grc to tColor
end mouseDown

Al

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: mouseColor

Post by richmond62 » Tue Jan 21, 2014 7:29 pm

Here's one that returns the colour for all sorts of places on your screen.
where.livecode.zip
(590 Bytes) Downloaded 211 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: mouseColor

Post by richmond62 » Tue Jan 21, 2014 7:31 pm

Better version.
Attachments
where.livecode.zip
(605 Bytes) Downloaded 216 times

Post Reply

Return to “Off-Topic”