Clicks along a line
Mike Bonner
bonnmike at gmail.com
Wed Jul 27 14:54:46 EDT 2011
As mentioned, the globalloc() function takes a relative location and turns
it into a screen relative numbers. localloc() takes a screen relative
location and converts it to card relative. So if you want to move the mouse
to a location in your stack then have it click, you can first set the
screenmouseloc to globalloc(40,300) which will move it to your first click
location. Since screenmouseloc is screen based your numbers have to be based
on that, which is why the globalloc() is necessary to convert your card
relative 40,300 location. At this point, since the mouse is where you want
it you can 'click at the mouseloc'
Then modify your card relative number, again feed it to globalloc() and
proceed.
Something like this (untested) will probably work.
on mouseUp
put globalLoc("40,300") into tMouseLoc
repeat 6 times
set the screenMouseLoc to tMouseLoc
click at the mouseLoc
add 40 to item 1 of tMouseLoc
wait 500 milliseconds with messages -- I just put that in to watch the
mouse pointer move
end repeat
end mouseUp
If you just want to have the clicks done, you don't need to set the
screenmouseloc necessarily, you can just 'click at tMouseLoc I think. Will
have to test to make sure
On Wed, Jul 27, 2011 at 11:51 AM, barryb at libero.it <barryb at libero.it> wrote:
> >Barry,
>
> >Why exactly does it click on your desktop? If you re-calculate the
> locations, it should click on the card. There's a function globalLoc().
>
>
> Damned if I know, but I saw the mouse icon do it to the left of my stack
> and when it's path passed over the Rev toolpalette the relative objs on the
> card reacted to the change in colour, as per my script! That was the nearest
> I've ever got to what I want! (FWIW -- Using Rev 3.5 on MS Vista)
> --
> >Best regards,
> >Mark Schonewille
>
> Grateful and puzzled
> Kind regards
> Barry Barber
>
>
> _______________________________________________
> 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