Clicks along a line

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

Clicks along a line

barryb@libero.it

I am trying to make the mouse click at fixed intervals along a straight line. So far, I have the following which 'compiles' without errors:

on RollEm
   click at "40,300" -- first point on line
   repeat 5 times
      move the mouseLoc relative "40,0" without waiting
   click at the mouseLoc
   end repeat
end RollEm

Only the first statement works. At line 4 it throws the error:

Type    move: can't find object
Object    card id 1002
Line    move the mouseLoc relative "40,0" without waiting
Hint    RollEm

How should I script that repeat structure?
With many thanks in advance.
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

xtalkprogrammer
Hi Barry,

Have a look at the screenMouseLoc. You can't move the mouseLoc, but you can set the screenMouseLoc.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

What does that error mean? Buy LiveCodeErrors for iPhone now http://qery.us/v4 A must-have for LiveCode programmers.

On 27 jul 2011, at 16:49, [hidden email] wrote:

>
> I am trying to make the mouse click at fixed intervals along a straight line. So far, I have the following which 'compiles' without errors:
>
> on RollEm
>   click at "40,300" -- first point on line
>   repeat 5 times
>      move the mouseLoc relative "40,0" without waiting
>   click at the mouseLoc
>   end repeat
> end RollEm
>
> Only the first statement works. At line 4 it throws the error:
>
> Type    move: can't find object
> Object    card id 1002
> Line    move the mouseLoc relative "40,0" without waiting
> Hint    RollEm
>
> How should I script that repeat structure?
> With many thanks in advance.
> 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
Kind regards,

Drs. Mark Schonewille

Economy-x-Talk Consultancy and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
Facebook: http://facebook.com/LiveCode.Beginner
KvK: 50277553
Reply | Threaded
Open this post in threaded view
|

Re: Clicks along a line

dunbarxx
In reply to this post by barryb@libero.it
Wouldn't it be more straightforward to:



on RollEm
   put "40,300" into tCllick-- first point on line
   click at tClick
   repeat 5 times  --or 4?
      add 40 to item 1 of tClick
      click at tClick
   end repeat
end RollEm





-----Original Message-----
From: barryb <[hidden email]>
To: Use List Revolution <[hidden email]>
Sent: Wed, Jul 27, 2011 6:52 am
Subject: Clicks along a line



I am trying to make the mouse click at fixed intervals along a straight line. So
far, I have the following which 'compiles' without errors:

on RollEm
   click at "40,300" -- first point on line
   repeat 5 times
      move the mouseLoc relative "40,0" without waiting
   click at the mouseLoc
   end repeat
end RollEm

Only the first statement works. At line 4 it throws the error:

Type    move: can't find object
Object    card id 1002
Line    move the mouseLoc relative "40,0" without waiting
Hint    RollEm

How should I script that repeat structure?
With many thanks in advance.
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