Hi Mike:

You need to do things a little differently.  Try the following...

Set up some kind of a trigger to start/stop the color tracking.  This can be 
anything but I'll use a button with it's autoHilite property disabled just for 
simplicity.

on mouseUp
    set the hilite of me to not the hilite of me
    if the hilite of me then
        set the cursor to cross
        set the lockCursor to true
        trackColor
    end if
end mouseUp

command trackColor
   If not the hilite of me then
       set the lockCursor to false
       exit trackColor
   end if
   get the mouseColor
   set the backgroundColor of graphic "Little" to it
   if keysDown() is not empty then set the backgroundColor of graphic "Big" to 
it 
   send "trackColor" to me in 50 millisecs
end trackColor

--------------------

The above should start color tracking when the button is pressed, and stop when 
the button is pressed again.

Your script was not working because the mouseMove message is really only sent 
when the cursor is within LiveCode windows, so you need to use a looping script 
("send trackColor" in this case) that can be terminated by some action (second 
button press).

Hope this helps.

Scott Rossi
Creative Director
Tactile Media, UX Design

On Jan 8, 2012, at 4:27 AM, Michael Doub <m...@doub.com> wrote:

> Scott,
> 
> My app is pretty simple.  2 graphic objects, one called "Big" the other 
> called  "Little".    I have double 
> checked and the cursor switches from cross to arrow when you leave the stack 
> window and mousecolor stops.
> 
> -= Mike
> 
> On Mousemove
>   set the cursor to cross
>   set the lockCursor to true
>   set the backgroundcolor of graphic "Little" to the mousecolor
> end Mousemove
> 
> on RawKeyDown thekey
>   set the backgroundcolor of graphic "Big" to  the  backgroundcolor of 
> graphic "Little"  
>   pass RawKeyDown  
> end RawKeyDown  
> 
> on CloseStack
>   set the lockCursor to false
> end CloseStack
> 
> 
> 
> 
> On 2012-01-08, at 12:23 AM, Scott Rossi wrote:
> 
>> That seems wrong, like something else is going on.  Mark S is right, going
>> across multiple monitors seems to fail, but you should be able to grab color
>> from anywhere on the screen, not just within LC windows.
>> 
>> Have you tried to make a simple test stack/script that only grabs the
>> mouseColor?
>> 
>> Regards,
>> 
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX Design
>> 
>> 
>> 
>> Recently, Michael Doub wrote:
>> 
>>> i am on mac 10.7.2 where I see the problem
>>> 
>>> I just updated my PC to windows 7 and it seems to be working on that system,
>>> but the cursor is constrained to only the livecode windows.   Is there a way
>>> to capture the mousecolor outside of the livecode windows?   I am setting
>>> lockcursor to true.
>>> 
>>> There is definitely a behaviour difference between my mac and PC.
>>> 
>>> -= Mike
>>> 
>>> 
>>> 
>>> On 2012-01-07, at 6:03 PM, J. Landman Gay wrote:
>>> 
>>>> On 1/7/12 4:57 PM, Scott Rossi wrote:
>>>>> Mac 10.6.8
>>>>> 
>>>>> Maybe a Lion thing?...
>>>> 
>>>> That's a thought. I'm on Snow Leopard. It works there.
>>>> 
>>>> -- 
>>>> Jacqueline Landman Gay         |     jac...@hyperactivesw.com
>>>> HyperActive Software           |     http://www.hyperactivesw.com
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>> subscription
>>>> preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription
>>> preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to