Calling AppleScript gurus: help need with QuickTime mask script

This is a very specific request for a reader of MDN:

“I need a working AppleScript that applies a mask to the front QuickTime movie. I can’t seem to get it to work. This is the “bad” script:

tell application “QuickTime Player”
set mask of track “Video Track” of movie 1 to file “Mac HD 40 GB:Users:powermac:Desktop:web_video_mask.psd”
end tell

It get’s hung up on this line:
set mask of track “Video Track” of movie 1 to file “Mac HD 40 GB:Users:powermac:Desktop:web_video_mask.psd”

I am just beginning in Applescripting. I hope that among your many readers, someone will be able to provide the answer. Thank you in advance.”

If you are an AppleScript guru with the answer, please use the reader feedback below to post the working script or email the script to


  1. my understanding is that the skins have to be pict files as per the tutorial

    and it seems to work

    But I’ll ask a question to go with this
    I have three QTmovies that run fine (all three at the same time)
    But the same three movies IF they have skins on them drop frames all over the place

    For me it’s a deal breaker for using skins on my project

    any thoughts?

  2. What’s really insanely frustrating is none of the set mask applescript stuff works with QuickTime VRs. I’m not talking about skins but masks. So basically the QuickTime Player dictionary lied that it was possible at all (look — it says a movie track has a property of “mask image — the mask of the track.” I’ve tried about 1000 different syntaxes and none work. Doesn’t seem to matter if its a PICT or PNG or Xerox STAR icon bitmap (yes, the one with an odd number of pixels). Why, oh why can’t it be done via AppleScript?

  3. (* Batch process QuickTime movies to add a custom mask.

    Create a mask file in PhotoShop by making a new file say 320x240px with a transparent background and add a new layer and draw the mask, use blur to create a soft edge. save the mask as “mask.psd” into the “AutoMask” folder. *)

    tell application “QuickTime Player”
    open file “Work:WAF – Lightworks:AutoMask:mask.psd” — Path to PhotoShop mask
    set position of window “mask.psd” to {20, 50} — Position mask on screen
    copy movie “mask.psd”
    open file “Work:WAF –” — Path to QuickTime movie
    set position of window “” to {380, 50} — Position movie on screen
    select window “”
    add movie “” with scaled — Paste mask onto QuickTime movie
    set show detailed movie info window of movie “” to true
    set transfer mode of track “Video Track 2” of movie “” to premul white alpha — For “Video Track 2” to work make sure your movies only have 1 video track
    save movie “” in file “Work:WAF –” as self contained
    close window “”
    say “Mask applied and file saved”
    end tell

Reader Feedback

This site uses Akismet to reduce spam. Learn how your comment data is processed.