Tricky Problem

Dick Kriesel dick.kriesel at mail.com
Wed May 23 03:04:37 EDT 2007


On 5/22/07 2:01 PM, "Dave" <dave at looktowindward.com> wrote:

> 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.
> 
> Any ideas?

Hi, Dave.  Another way uses the executionContexts, even though it's not
supported or documented.  It is simpler than passing parameters and
distinguishing them.

<script>
if word 1 of line -2 of the executionContexts is "button" then
</script>

You can check for a particular button as well as distinguish mouseUp from
mouseDown, if you want.

<script>
if item 1 to 2 of line -2 of the executionContexts is /
    the long id of button "foo","mouseUp" then
</script>
 
-- Dick





More information about the use-livecode mailing list