Moving the mouse pointer by script

BNig bernd.niggemann at uni-wh.de
Wed Feb 3 21:24:36 EST 2016


Hi Scott,

just looked at it and if I understand what you want to do then the drag
command does it.

make a small graphic "g1" place it into the center of a card
make a button "bDrag" and place it in the topLeft cornder

another button in the lower half of the card

script of that button

--------------------------------
on mouseUp
   put the bottomRight of btn "bDrag" into tStart
   subtract 1 from item 1 of tStart
   subtract 1 from item 2 of tStart

   put loc of grc "g1" into tEnd
   choose the pointer tool
   select button "bDrag"
   set the dragSpeed to 100
   drag button 1 from tStart to tEnd 
   choose the browse tool
end mouseUp
------------------------------

this will change the size of the button and you can watch this.

You can also move the button without changing its size if you don't select
and edit mode the script etc.

movement is not super smooth but it moves. DragSpeed controls speed.

Kind regards
Bernd



--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Moving-the-mouse-pointer-by-script-tp4700669p4700697.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list