re:Clicks along a line

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

re:Clicks along a line

barryb@libero.it
>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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Clicks along a line

Mike Bonner
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, [hidden email] <[hidden email]> 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
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

re: Clicks along a line

barryb@libero.it
In reply to this post by barryb@libero.it
Hello Mike,THANKS, YES! Your explanation was really useful and the scriptlet worked first time, including all the dependent handlers.That's a project I gave up on months ago and only recently decided to have another try due to some new intuitions. Now I can go to bed happy! 01.30
Thanks again and also to Mark and Craig.Barry
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode