Getting mouseColor from outside the app window

Malte Pfaff-Brill revolution at derbrill.de
Fri Oct 23 09:10:23 EDT 2009


Timers are your friend. This works on my mac:

In a button:

on mouseUp
    set the uPoll of me to not the uPoll of me
    if the uPoll of me then pollColor
end mouseUp

on pollColor
    put the mousecolor
    if the uPoll of me then send "pollColor" to me in 40 millisecs
end pollColor

Click to start, click again to stop. Move your mouse anywhere, see the  
color in MSG.

Hope that helps,

Malte


More information about the use-livecode mailing list