Scripting the Clipboard
The Clipboard is the place that stores text, pictures, and other data that you cut or copy in an application, then paste in another application. The Standard Additions dictionary includes several commands that let you use the contents of the Clipboard. Using these commands, you can automate moving data between applications. To see the commands, open the Standard Additions dictionary in the Script Editor, then click the Clipboard Commands suite.
The Clipboard commands can work with many types of data, including styled text, plain text, international text, pictures, and sounds. The Standard Additions dictionary defines three commands: You use the Clipboard commands in a Tell statement after using the Activate command to make an application active. The following script assigns the contents of the Clipboard to a variable: The next example sets the contents of the clipboard to the text specified in the script:
|
|||||||||||||
Table of contents |