nudge Supercard

Terence Heaford t.heaford at
Wed Jun 29 09:45:42 EDT 2016

> On 29 Jun 2016, at 10:32, Richmond <richmondmathewson at> wrote:
> Can anyone tell me what purpose the terms "nudge" and "until mouse" as in:
> move card grc "GraphicObjectName" to the points of Cd grc "GraphicObjectPathName" nudge 2 until mouse
> serve in SuperTalk?
> Richmond.
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:


The nudge keyword is used in conjunction with the move command to specify that the object identified in objectDescriptor move the number of pixels supplied in number along the path generated by the move command.
The following handler moves a ball graphic around a square graphic, moving 5 pixels at a time:
on MoveBall
 move cd grc "Ball" to points of cd grc "Square" nudge 5
end MoveBall
Note that the larger number is, the faster the object will appear to move.


The until keyword is used to specify that an operation should continue until a specified condition is met.


The mouse function returns the current state of the mouse button, either “up” or “down.”
The following handler displays the current location of the mouse until the user clicks the mouse button:
on ShowLoc
 set the lockCursor to true
 set the cursor to plus
 repeat until the mouse is down
 		put the mouseLoc
 end repeat
 set the lockCursor to false
end ShowLoc
You can use the mouse function to allow other currently running applications (processes) to multi-task with SuperCard; in effect, you can start a script running and then send SuperCard to the background to continue processing the script. 
To do this, you need to get the mouse (or get mouse()) repeatedly within your script. This would allow you to work with other applications while a script was running and have the script continue to run in the background. For an example of how this is used, see the entry for the notify command.

All the best


More information about the Use-livecode mailing list