Simulated mouse messages
Marielle Lange
mlange at widged.com
Wed Mar 7 06:44:26 EST 2007
Hi Brent,
> I'm working on simulating mouse messages and am hung up on how to
> simulate mouseDown, mouseStillDown, and mouseUp messages from
> script (specifically, network messages). Any thoughts?
Send is the obvious solution. Another one is "call". Another one is
"click".
Send: "All object references in the message are evaluated *relative
to the target object*, not to the object whose script issued the send
command. "
Call: "handler you call are treated *relative to the object whose
script issued the call command*, not relative to the object you specify.
Click: "Use the click command to simulate the action of a click,
instead of sending a mouseDown or mouseUp message--for example, to
create a graphic or image with a handler."
A better way, however, is to write your script to work independent of
the specific controls on the interface
on mouseup
doWhateverNeedsToBeDoneOnMouseup
end mouseup
on doWhateverNeedsToBeDoneOnMouseup
... processing ...
end doWhateverNeedsToBeDoneOnMouseup
and call "doWhateverNeedsToBeDoneOnMouseup" rather than "mouseup"
Best,
Marielle
------------------------------------------------
Marielle Lange (PhD), http://widged.com
Bite-size Applications for Education
More information about the use-livecode
mailing list