Name

copy

Syntax

copy value to variableName

Description

Assigns value to variableName.

Example

copy 5 to x

An abbreviation for copy is put; an abbreviation for to is into. Thus you could type put 5 into x—although it would still come out as copy 5 to x. These abbreviations were designed to accommodate HyperCard users, who were habituated to this idiom.

Get AppleScript: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.