Detecting the stack that have the mouse pointer

Ken Ray kray at sonsothunder.com
Mon Apr 4 13:46:20 EDT 2005


On 4/4/05 12:23 PM, "Scott Rossi" <scott at tactilemedia.com> wrote:

>  on checkMode
>   put the openStacks into tList
>   repeat for each line L in tList
>     if within(stack L,the screenMouseLoc) then put the mode of stack L
>   end repeat
>   send "checkMode" to me in 50 millisecs
>  end checkMode

Can't you just say:

  put the mode of the mouseStack

??

I tested it this way - put this script into a button:

on mouseUp
  CheckIt
end mouseUp

on CheckIt
  if the commandKey is down then exit CheckIt
  if the mouseStack <> "" then
    put the short name of the mouseStack && (the mode of the mouseStack)
  end if
  send "CheckIt" to me in 50 milliseconds
end CheckIt

Click the button, and start moving over different stacks - you should see it
change accordingly. Hold down the Command key to make it stop.

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list