Media Services, 149 Kerr Hall, 831-459-2117


AppleScript Examples

  • These are the scripts to run in iCal.
  • They are generated in the Script Editor and saved as .scpt files.
  • Italized text should be changed to work with your set up.

The most important functions in the system are as follows:

The scripts below are miscellaneous scripts for other activities such as deleting files and quitting applications.

Delete Files(should to be done before new class recording)

The first command removes files and the second removes directories.

try
activate
tell application "Terminal"
activate
do script with command ("rm movies/class_name.mov movies/data_convert/class_name.mov movies/vid_convert/class_name.mov movies/noaudio/class_name.mov")
do script with command ("rm -r movies/data/class_name")
delay 5
quit
end tell
end try

Quit QuickTime Pro

tell application "QuickTime Player"

quit

end tell

Quit Terminal

tell application "Terminal"

quit

end tell

Questions or comments? Let us know.