Code: Select all
on mouseUp
wait for the mouseclick
if the mouseclick is true then
get the backgroundcolor of the graphic at the clickloc
end if
end mouseUp
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
on mouseUp
wait for the mouseclick
if the mouseclick is true then
get the backgroundcolor of the graphic at the clickloc
end if
end mouseUp
Code: Select all
on mouseUp
wait for the mouseclick
if the mouseclick is true then
...
end mouseUp
Code: Select all
on mouseUp
wait 20
if the mouseClick then beep 2 else beep 1
end mouseUp
Code: Select all
local sIsSampling
on mouseUp
if not sIsSampling and the short name of the target is "sample color" then
put true into sIsSampling
put empty into field "colour"
exit mouseUp
else if sIsSampling then
put the backgroundColor of the target into field "colour"
put false into sIsSampling
end if
end mouseUp
Code: Select all
on escapeKey
# reset and stop it from sampling a colour
put false into sIsSampling
put empty into field "colour"
end escapeKey
Code: Select all
on mouseEnter
set the lockCursor to true
set the cursor to cross
end mouseEnter
on mouseLeave
set the cursor to empty
set the lockCursor to false
end mouseLeave
You have to start somewhere.on mouseUp will switch the cursor from the pointer to my eyedropper cursor
Code: Select all
on mouseUp
set the cursor to cross
wait until the mouseClick
put the mouseColor into fld 1
end mouseUp
Code: Select all
wait until the mouseClick