Archived - QuickTime Pro: AppleScripts for Mac OS 10.1

This document lists and describes the scripts available from the AppleScript Web site for use with QuickTime 5 using Mac OS 10.1 or later and QuickTime Pro.
This article has been archived and is no longer updated by Apple.
QuickTime 5.0.2 offers dramatically increased AppleScript support in the QuickTime Player application. The QuickTime Player scripting dictionary contains exciting new commands and properties which can be used to automate many movie-editing and playback tasks performed by novices and professionals alike.

This collection of example scripts contains a variety of useful scripting tools, including script applets, droplets, and compiled scripts for use with the Script menu. These are briefly described below. All scripts are fully editable and many have properties whose values can be easily changed.

NOTE:

  • These scripts are designed to work only with QuickTime 5.0.2. on Mac OS X 10.1 using QuickTime Pro. Many of the scripts will not work with earlier versions of QuickTime, including QuickTime 4.1.
  • These scripts are not compatible with Mac OS X 10.0 - 10.0.4.


For more information concerning QuickTime Player scripting and AppleScript, visit the AppleScript website at: (http://www.apple.com/applescript/)

Download the scripts from Apple Developer site

  • Applets-Droplets - (41 scripts)

    Applets are AppleScript scripts saved as small self-running applications. Double-click them to start them as you would with any other application.


    Droplets are special AppleScript applications which respond to files and folders dragged onto their icon. All of the following droplets can be used to process or play QuickTime files. Each droplet will process the individual dragged-on files or folders containing files and sub-folders containing more files, which have been dragged onto its icon.

    Each droplet has properties or parameters which can be set by double-clicking the droplet and clicking the "Set Prefs" button in the main dialog.

    The following is a brief description of each applet or droplet and instructions for its use:
  • Add to Favorites · Drag QuickTime files or folders of QuickTime files onto this droplet to have each file added to your favorites list.
  • All Annotations Droplet · This droplet can be used to set the value of all or some of the available annotations for QuickTime files. If an annotation does not exist, the script will create it.

    To access the preferences dialog and set the value for specific annotations, double-click the droplet, and then click the "Set Prefs" button in the main dialog window.

    The following are the names of the available annotations: "Album", "Artist", "Author", "Comment", "Copyright", "Creation Date", "Description", "Director", "Disclaimer", "Full Name", "Host Computer", "Information", "Make", "Model", "Original Format", "Original Source", "Performers", "Producer", "Product", "Software", "Special Playback Requirements", "Warning", "Writer"

  • Annotations & Credits Droplet · This droplet functions in the same manner as the Limited Annotations Droplet. In addition to setting the annotations of dragged-on movie files, it will also create scrolling credits based on the annotations and place them at the start of the movie.
  • Change to PictureViewer File · Drag image files or folders of image files onto this droplet to change the creator type of every image file to "ogle", which is the creator code for the PictureViewer application.
  • Clear All Annotations Droplet · This droplet will remove annotations from dragged-on movie files. Double-click the droplet to access the preferences for determining whether to retain the existing movie title.
  • Convert to DV Stream · This droplet will convert movie files to DV format which can then be imported into iMovie. The original file will be replaced by the newly created file.
  • Convert to QuickTime Format · This droplet will open files saved in supported formats and save them as QuickTime files with a file type of MooV and a creator type of TVOD. The original file will be replaced by the new file.
  • Create Slideshow From Folder · Drag a folder of images onto this droplet to create a slideshow movie file. Options include: making the file self-presenting and self-closing, auto display of images (movie mode) or manual advancing (slideshow mode), seconds per image or images per second, and saving the file as a proxy linked to the images or as self-contained.
  • Display Folder as Slideshow · Similar to the "Create Slideshow From Folder" droplet except there is no completion action and no file is saved. Great for a quick perusal of images.
  • Limited Annotations Droplet · This droplet can be used to set the value of a small number of annotations for QuickTime files. If an annotation does not exist, the script will create it.

    To use, enter the name of the annotation in the comment field of the droplet followed by a colon and then the value for the indicated annotation. The comment field is in the Finder information window of the droplet (select the droplet and type command-I). Each paragraph in the comment field will be considered to be a separate annotation. For example:
    Copyright:©2000 Your Company
    Product:Your Video Product
    Author:Ordinary User
    Performers:Me, Myself, and I

    See the description of the "All Annotations Droplet" for a list of supported annotations.
  • Play Movies · This droplet will play dropped-on movies in sequential order. Double-click the droplet to access the playback preferences.
  • Prep Camera Images for Web · This droplet can be used to resize digital camera images and convert them to JPEG format for use on the Internet. Double-click the droplet to set the preferences for image width and height.
  • Present Movies · This droplet will present dropped-on movies in sequential order. Double-click the droplet to access the playback preferences which include presentation size, looping, continuation query dialogs, and movie volume.
  • Present Neighbor Movies · this script applet, when launched, will present any movie files which are located in the same folder as the droplet.
  • Sample Audio CD · This applet will extract a sample of an indicated duration from each track of an audio CD and compress the result using a chosen QT compressor setting.
  • Save As Un-Editable · This droplet will save a movie file so that it cannot be edited or saved. After setting the saveable property to false, the original movie file is exported as a self-contained movie. The original file is deleted, so use this droplet only on copies.
  • Save Copy as DV Stream · This droplet will save copies movie files to DV format which can then be imported into iMovie.
  • Save Copy as Hinted · This droplet will open files in QuickTime formats and export a copy to a indicated folder as hinted QuickTime files of file type of MooV and a creator type of TVOD. Double-click the droplet to access the hint settings preferences.
  • Save Copy in QT Format · Same as the "Convert to QuickTime Format" droplet except the original file is not replaced and the user is prompted to locate a folder which will contain the duplicate files.
  • Send & Play Remote Movie · When a single movie file is dragged onto this droplet, this script is designed to:

      1. Turn on file sharing on a specified remote computer
      2. File share the startup disk from the remote computer over TCP/IP
      3. Find/create a folder named "Movies" on the root level of the mounted volume
      4. Copy the movie file into the "Movies" folder replacing any existing copies
      5. unmount the shared volume and turn off file sharing on the remote computer
      6. Instruct the remote computer to play the newly copied movie file

    Complete instructions for setup and execution of this script are detailed in AppleScript Guidebook Module for Program Linking Over IP, available on the AppleScript Website: http://www.apple.com/macosx/features/applescript/l
  • Set Controller Type · This droplet set the type of controller displayed for the movie. Double-click the droplet to access the preferences for controller type.
  • Set HREF Property · Using this droplet you can assign a URL to a movie so that when the movie is clicked, another webpage or movie is opened. This property overrides any HREF's assigned to tracks within the movie.

    To set the target file or page to load within the same window as the linked movie, use this format for the URL:
    <file URL relative to this movie>T<myself> For example: <media/nextmovie.mov>T<myself>
  • Media Skin Droplet · This droplet can be used to automate the creation of QuickTime movies which have custom media skin interfaces. This powerful script makes the multi-step process a breeze.
  • Streams Sampler · This droplet can be used to monitor multiple streams. To use, drag a text file containing a return-delimited list of target stream URLs onto the droplet. The script will then perform the following steps:

      1. The droplet will read the text file, and direct the QT Player to connect to the first stream in the list
      2. Once connected, the script will save a frame from the stream every 10 seconds for three times.
      3. The stream will then be closed and the next stream in the list accessed.
      4. Once a "snapshot" has been taken of all the streams, the script will open each saved frame and resize it to indicated dimensions.
      5. Once all the images have been resized, the script will create an HTML file showing the images and the source link.
      6. The created HTML file will then be opened in the default browser set in the Internet Control Panel.
    Double-click the droplet to set the default dimensions to be used for the resized images, and the number of seconds between frame captures.
    Playback Properties Droplets

    QuickTime 5.0 has added support for special playback properties which control the manner in which a QuickTime file is played in the QuickTime Player. In addition to the existing "auto play" property, QT 5.0 now supports: quit when done, auto quit when done, close when done, auto close when done, and auto present. These properties are not accessible through the QuickTime Player interface and can only be set via AppleScript scripts.

  • Disable Presentation Mode · This droplet sets the auto present property of dragged-on movies to false.
  • Display Playback Properties · This droplet will display a dialog showing the current status of all the playback properties of a movie file.
  • Reset Playback Properties · The droplet will set the status of the playback properties to either false or their default value.
  • Save As Presentation File · This droplet will set the playback properties so that a movie file will self-present and close or quit when completed. Double-click the droplet to set the preferences for presentation size, display mode (movie or slideshow), and the completion action (none, auto close, auto quit).
  • Set Auto Close Property · This droplet will save movie files so that they automatically close when finished playing.
  • Set Auto Play Property · This droplet will save movie files so that they automatically play when opened.
  • Set Auto Quit Property · This droplet will save movie files so that the QuickTime Player will automatically quit when the movie has finished playing.

Script Menu Scripts - (100 scripts)

The following scripts are installed in the Scripts folder in the System folder and are accessible via the OSA Script Menu. If you don't have the OSA Menu extension installed, the OSA Menu Lite 1.2.2 installer is included with the QuickTime scripts.

These scripts are meant to be copied, edited, and adapted for your requirements.

The following is a brief description of each script and instructions for its use:

Annotations
  • Set Name of Front Movie · This script will allow the user to set the Full Name annotation of the front movie.

Chapters
Finally, an easy way to create and edit chapter tracks!
  • Add Chapter at Current Time · This script will add a chapter at the current time of the front movie.
  • Chapter Summary · This script displays a list containing the name, start, and duration of every chapter of the front movie.
  • Create Chapter Track · This script will crate a chapter track for the front movie. Use the "Add Chapter at Current Time" script to add individual chapters once this script has created the chapter track.
  • Create Chapter Track From File · Use this script to create a chapter track from an imported text file.
  • Delete Chapter · Use this script to delete a chapter from the chapter track of the front movie.
  • Get Chapter Info · This script will display all the information about a chosen chapter.
  • Play a Chosen Chapter · Like the name says, this script will play a chapter selected from a list of chapters of the front movie.
  • Re-Name Chapter · Use this script to change the name of an existing chapter in the front movie.

Edit
QuickTime 5.0 has added support for the QuickTime Player Pro editing commands: cut, copy, paste, trim, add, and add scaled.
  • Copy Selection to New Movie · This script will copy the current selection from the front movie, open a new movie and paste the selection on the clipboard into the new movie.
  • Cut 1 Second Forward · This script will cut the selection from the current play point of the front movie to one second ahead.
  • Cut from Beginning · This script will select from the beginning of the front movie to the current play point and then cut that selection.
  • Cut Selection to New Movie · This script will cut the current selection from the front movie, open a new movie and paste the selection on the clipboard into the new movie.
  • Cut to End · This script will select from the current play point in the front movie to the end and then cut that selection.
  • Edit Frame in GraphicConverter · This script will open the current frame in the GraphicConverter application from Lemke Software. Version 4.0 of this powerful image editing application has increased AppleScript support.
  • Merge Movie 1 into Movie 2 · This script will add a copy of the front movie to the movie behind it.
  • Scale Front Movie to x% · This script will proportionally scale the front movie to the user supplied percentage.
  • Select from Beginning · This script will select from the beginning of the front movie to the current play point.
  • Select to End · This script will select from the current play point in the front movie to the end of the movie.
  • Select X Seconds · This script will prompt the user for the number of seconds to select from the current play point of the front movie. It will then select the requested number of seconds from the current play point.
  • Set Dimensions of Front Movie · This script will prompt for a width and height to be applied to the front movie and will scale it accordingly.
  • Start Movie 2 with Movie 1 · This script will place a copy of the front movie at the start of the movie behind it.
  • Zero Out Selection · This script will set the select points of the front movie to 0.

Export
  • Export to DV Stream · This script will export the front movie in DV format which can then be imported into iMovie.
  • Preview Frame w/2 Settings · This script can be used to preview an export with any two QuickTime export settings. When run, the script will prompt the user to choose two export settings from the list of built-in standard settings. Next, it will prompt to locate a folder in which it can place the export temp files. The script will then extract the current frame and export a copy with each of the chosen settings applied. The script will then generate a SMIL file which will be opened to display the result side-by-side in a new movie window.
  • Save Current Frame as BMP · This script saves the current frame on disk as BMP image.
  • Save Current Frame as JPEG · This script saves the current frame on disk as JPEG image.
  • Save Current Frame as PICT · This script saves the current frame on disk as PICT image.

Favorites
  • Create HTML Favs Summary · This script will create an HTML page containing the name of every favorite and its URL. The page will be automatically opened in the default browser set in the Internet Control Panel.
  • Delete Specific Favorite(s) · This allows the user to delete user-defined favorites chosen from a list of favorites.
  • Go To Favorite · This script will present a list of all favorites by name from which the user can pick the one to be accessed.
  • List Favorite URLs · This script will present a list of all favorites by URL from which the user can pick the one to be accessed.
  • Save Favorites Info · This script will create a text file containing the name and URL of every favorite.

HTML
  • EMBED Tag Wizard · This script will prompt the user to answer a series of questions in order to create the appropriate EMBED tag for displaying a QuickTime movie in a webpage. The derived HTML tags will be placed on the clipboard or written to a file on disk.

Info
  • Info for Front Movie · This script will present a dialog containing information about the front movie including: natural dimensions, length, seconds elapsed, seconds remaining, file size, creation date, modification date, and creator code. There is an optional button which when pressed, will reveal the front movie file in the desktop.
  • QuickTime Settings · This script will present a dialog containing information about the version of QuickTime installed, the current connection speed settings, and whether QuickTime Pro has been activated. There is an optional button which when pressed, will open the QuickTime Control Panel.
  • Source URLS of Front Movie · This script will display a dialog showing the source URL of the current streaming movie. There is an optional button to place the URL on the clipboard.
  • Timecode of Front Movie · This script will present the current timecode of the front movie in a dialog. There is an option to copy the timecode to the clipboard.

Misc
  • Create Thumbnail Link Movie · This script will automate the process of creating a link movie placed in a webpage which when clicked will open another movie in the QuickTime player.

    When run the script prompts for either the width or height of the desired thumbnail movie. Once the desired dimensions have been entered by the user, the script will copy the current frame into a new movie and scale the image to the requested dimensions. The script will then generate the HTML embed tag for the thumbnail movie based on the new movie file and the front movie.
  • Place Text on Clipboard · This script will present a dialog in which the user can enter text which will be placed on the clipboard.
  • Revert Front Movie · This will close the front movie without saving any changes and reopen it into a new window.
  • Set Controller · This script will prompt the user to choose a controller type from a displayed list of controller types.
  • Set Sound Volume · This script will allow the user to set the volume of the front movie. A setting of 0 to 255 is in the normal range. A setting of 256 to 384 sets the sound to overdrive.

Navigation
  • Move to End of Front Movie · This script will set the current play point to the end of the front movie.
  • Move to X in Front Movie · This script will prompt the user to indicate a point in the movie and then will set the current play point to the indicated number. The time of the current play point is indicated as the default text in the input field.
  • Reset Front Movie · This script will move the current play point of the front movie to the beginning. It will also set the selection pointers to 0.
  • Rewind Front Movie · This script will move the current play point of the front movie to the beginning.

Play
  • Play Front Movie at X% Speed · This script will prompt the user for a speed percentage at which to play the front movie. For example, an answer of 150 will play the front movie at one and one half the normal rate -- normal being expressed as 100.
  • Play Front Movie from Start · This script will play the front movie from its beginning.
  • Step Thru Front Movie · This script will move incrementally through the front movie with one second delays between each movement.
  • Present Front Movie · This script will present the front movie at full screen.

Preview
The Preview of a movie is the small movie snippet displayed at the left of the open dialog when a movie file is accessed by using the "Open Movie in New Player" command in the QuickTime Player.
  • Play Preview · This script will play the section of the front movie currently set as its preview.
  • Set Preview to Selection · This script will assign the current selection of the front movie as its preview.

Properties
  • 01-Playback Properties · This script will present a dialog summary of the status of the playback properties of the front movie.
  • 02-Auto Play · This script will allow the user to set the value of the auto play property to true or false.
  • 03-Close When Done · This script will allow the user to set the value of the close when done property to true or false.
  • 04-Auto Close When Done · This script will allow the user to set the value of the auto close when done property to true or false.
  • 05-Quit When Done · This script will allow the user to set the value of the quit when done property to true or false.
  • 06-Auto Quit When Done · This script will allow the user to set the value of the auto quit when done property to true or false.
  • 07-Auto Present · This dialog will allow the user to set the value of the auto present property to true or false.
  • 08-Presentation Mode · This script will allow the user to set the value of the presentation mode property to either movie mode or slideshow mode.
  • 09-Presentation Size · This script will allow the user to set the value of the presentation size property to normal, double, half-size, or full screen.
  • 10-Reset Playback Properties · This script will set the value of the playback properties to false or their default values.
  • HREF of Front Movie · Using this script, you can assign a URL to a movie so that when the movie is clicked, another webpage or movie is opened. This property overrides any HREF's assigned to tracks within the movie.

    To set the target file or page to load within the same window as the linked movie, use this format for the URL:
    <file URL relative to this movie>T<myself> For example: <media/nextmovie.mov>T<myself>
  • Path to Front Movie · This script will display a dialog containing the path to the front movie file. There is an optional button to have the file displayed in the Finder.

SMIL
SMIL stands for Synchronized Multimedia Integration Language (pronounced "smile") and is an XML-based language developed by the World Wide Web Consortium as a way to standardize the control and display of media content. Support for SMIL was introduced in QuickTime 4.1 and has been enhanced in 5.0.
  • Image Overlay with Link · This script will create a SMIL file which places an image over part of a background movie. For example, you can have a company logo display at the bottom right of a movie. When the overlay image is clicked, a new webpage will open displaying a target URL.
  • Movie Caption w/ Link & Slider · This script will create a SMIL file which displays static text along the bottom of a movie.
  • Movie Caption with Link · This script will create a SMIL file which displays static text along the bottom of a movie. Clicking the text will open a specific webpage or movie.
  • SMIL Sequence Wizard · This script will create reference movies which play sequences of QuickTime movies composed of files or remote streams. The user answers a series of questions and the script generates the appropriate SMIL QuickTime movie.
  • SMIL Slideshow w/ Bckgnd Audio · This script will create a SMIL slideshow with background audio. Run the script and select a folder containing JPEG, GIF, or PICT images and an audio file to be played in the background. NOTE: saving the audio file as a QuickTIme movie will ensure that it plays smoothly.

Text Tracks
  • Annotations to Rolling Credits · this is a description of this script
  • HREF for Web Movie End · This script will prompt the user for a target URL to assign to the end of the front movie. Successive dialogs will determine whether to navigate to the assigned URL automatically or by user click, and whether to do so in a new window or the current window.
  • HREF for Web Movie Selection · This script will prompt the user for a target URL to assign to the selected area of the front movie. Successive dialogs will determine whether to navigate to the assigned URL automatically or by user click, and whether to do so in a new window or the current window.
  • Rolling Credits for Front Movie · This script will create rolling credits for the front movie based on the Full Name annotation, entered or imported credits, and prompted copyright information. The new credits will be a newly created movie. You can import credits from a text file with each paragraph considered a new credit.

Tracks
Undoubtably THE most powerful new feature of the QuickTime Player's enhanced scripting abilities is its support for the control of tracks.
  • Create Static Text Track · This script will prompt the user to input text into a dialog. The text will then be imported into the front movie as a new text track. Next the script will provide the ability to position the text track anywhere in the front movie window by entering its {x,y} coordinates.

    Place QuickTime text tags in the input text for styling or to create links. For example, {HREF}http://www.apple.com{endHREF} will be displayed in the new text track as a clickable hyperlink.
  • Delete All Disabled Tracks · This script will delete any disabled tracks within the front movie. Note that some tracks, such as chapter tracks, are disabled intentionally.
  • Export Text Track(s) · This script will export the text to disk from text tracks chosen from a list of the text tracks contained in the front movie.
  • Extract All Tracks · This script will extract every track from the front movie into individual movies.
  • Import & Position Image Track · This script can be used to import and position images into the front movie. Great for adding a logo or button.
  • Rename Track(s) · This script allows the user to rename any tracks contained in the front movie.
  • Set Dimensions of Track(s) · This script will allow the user to resize any visible track contained in the front movie.
  • Set HREF of Track(s) · Visible tracks can have URL's assigned to them so that when they are clicked by the user, another webpage or movie is opened. This script will allow the user to assign URL's to any visible track contained in the front movie.
  • Set Layer of Track(s) · This script allows the user to set the layer of track(s) of the front movie.
  • Set Operation Color of Track(s) · The operation color of track determines which color will be effected by the transfer mode property. For example, a white areas of a track could be set to become transparent. This script allows the user to set the operation color of track(s) to either black, white, or gray.
  • Set Position of Track(s) · This script allows the user to position any visible track within the movie window area by entering the {x,y} coordinates of the top left of the track.
  • Set Start Time of Track(s) · This allows for the setting of the start time of a track(s). For example, a track can be set to begin at 3 seconds of the beginning of a movie.
  • Set Transfer Mode of Track(s) · This script allows the user to set the transfer mode of track(s). Blending and transparency are two example settings.
  • Tracks Info · This script wills post a dialog summary of the values of various properties of chosen tracks.

Window
  • Set Position of Front Movie · This script can be used to set the position of the front movie within the screen.
Last Modified: Feb 20, 2012
Print this page
  • Last Modified: Feb 20, 2012
  • Article: TA25539
  • Views:

    28167
  • Rating:
    • 57.0

    (15 Responses)