How to test If two objects are the same colour???

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

How to test If two objects are the same colour???

Post by Fasasoftware » Thu Mar 06, 2014 7:40 pm

Hi to everybody,

I would like to test in my program ...how i can verify 2 objects like a red rectangle (graphic) and an white image but not in full in white...with some part coloured with other colour... are the same colour or not....And i would like to know..if i can test only a portion of image with a rectangle....in other word i would like to test two objects with 2 specified spots are the same colour or not...

I have tryed with intersect function...but it was a bad idea......

Can you help me please??? i thank you a lot in advance....

Best regards,

Lestroso :oops:

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: How to test If two objects are the same colour???

Post by dunbarx » Thu Mar 06, 2014 9:30 pm

I have forgotten how to set the loc of the cursor. But when we find out how to do that, you can call the "mouseColor". Now you can get the color of any pixel, or of any point inside a control.

Anyone?

Craig Newman

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: How to test If two objects are the same colour???

Post by bn » Thu Mar 06, 2014 9:40 pm

how to set the loc of the cursor
screenMouseLoc

Kind regards

Bernd

Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

Re: How to test If two objects are the same colour???

Post by Fasasoftware » Thu Mar 06, 2014 10:08 pm

I thank you a lot....very very very much!!!! Now i will try your suggestions....thank a lot very much i appriciate so much.....

Best regards,

Lestroso :D

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: How to test If two objects are the same colour???

Post by dunbarx » Fri Mar 07, 2014 12:52 am

Ah, right, Bernd. Thanks.

So Lestroso, you see you can lock the screen, save the current cursor loc, send the cursor to any point on the card, even referencing certain parts of certain controls on that card, get your color info and restore the cursor to its original position.

Craig

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: How to test If two objects are the same colour???

Post by jmburnod » Mon Mar 10, 2014 12:04 pm

Hi All,
There is a mousecolor bug with MontainsLion.
http://forums.runrev.com/phpBB2/viewtop ... mousecolor
best regards
Jean-Marc
https://alternatic.ch

Post Reply