Apple Remote Desktop 2.2 User Manual
Page 91

Chapter 3
Administering Computers
91
To execute an AppleScript using the Send UNIX Command:
This method uses the
osascript
command. For detailed information on
osascript
,
see the
osascript man
page.
1
Select a computer list.
2
Select one or more computers in the Remote Desktop window.
3
Use the Copy Items command to copy your script to the client computers.
4
After copying the script, choose Manage > Send UNIX Command.
5
Type or paste the AppleScript in the UNIX Command window, like this:
osascript -e '[First line of script]' -e '[Next line of script]'
For example, a simple script to create a folder and set its label would be entered (all in
one line) as:
osascript -e 'tell the application "Finder"' \
-e 'make new folder' \
-e 'set the name of the result to "New Folder"' \
-e 'set the label index of folder "New Folder" to 2' \
-e 'end tell'
6
Click Send.
The client computer executes the script.