Tricky Problem

Sarah Reichelt sarah.reichelt at gmail.com
Tue May 22 18:27:26 EDT 2007


> What I really want is a way of tell if the mouseUp handler has been
> called by the user pressing the mouse or if it's via the "send" command.

Without going into the details of your script, one way to do this is
with a parameter e.g.

on mouseUp
  myHandler "mouse"
end mouseUp

on otherHandler
  send "myHandler send" to me in 5 seconds
end otherHandler

on myHandler pWhere
  if pWhere = "mouse" then
   -- called from mouse click
  else if pWhere = "send" then
  -- called by a send
  end if
end myHandler

HTH,
Sarah



More information about the use-livecode mailing list