Moving the mouse pointer by script

Roland Huettmann roland.huettmann at gmail.com
Wed Feb 3 15:52:29 EST 2016


Yes, that was the answer. Somehow I overlooked it.

As a little starter for those who need it here is a little script.

Without the wait command, the mouse movement is not visible.

on mouseUp
   get the topleft  of this stack
   add 10 to item 1 of it
   add 30 to item 2 of it
   put 1 into x
   put the width of this stack * 2 into n
   repeat n
      if item 1 of it >= the right of this stack then
         put x * -1 into x
      end if
      add x to item 1 of it
      set the screenMouseLoc to it
      wait 1
   end repeat
end mouseUp


Roland



On 3 February 2016 at 16:01, Klaus major-k <klaus at major-k.de> wrote:

> Hi Roland,
>
> > Am 03.02.2016 um 15:55 schrieb Roland Huettmann <
> roland.huettmann at gmail.com>:
> >
> > Looking up lots of sites and messages, I could not find a way moving
> > (dragging) the mouse pointer using a script.
> >
> > Or am I just blind?
> >
> > This is for an animation sequence... instead of the user dragging an
> > object, the object is dragged using the mouse without user interaction -
> so
> > the pointer is visually moving on the screen from A to B. The mouse
> pointer
> > is just moving to some location doing some action and the user watching
> it.
> > It should give a lesson to the user.
> >
> > A video can be made, but that is not what we intend to do. It should be
> > real.
> >
> > Any suggestions?
>
> check „the screenmouseloc“ in the dictionary.
> This is the only (location) property of the mouse that you can actually
> SET.
>
> > Roland
> >
> > I AM VERY HAPPY WITH 7.1. IT IS STABLE SO FAR: AND THAT IS MOST IMPORTANT
> > TO ME.
> > MANY THANKS TO THE DEDICATED ENDLESSLY WORKING TEAM IN GOOD OLD SCOTLAND.
> > CHEERS TO ALL OF THEM.
>
> Maybe version 7.1.2 (RC1) will make you even more happy? :-D
> It was published today.
>
>
> Best
>
> Klaus
>
> --
> Klaus Major
> http://www.major-k.de
> klaus at major-k.de
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list