Skip navigation

set the destination of a target using AppleScript

227 Views 2 Replies Latest reply: Nov 20, 2012 7:27 PM by troy7l RSS
troy7l Calculating status...
Currently Being Moderated
Nov 20, 2012 3:21 AM

I was trying to pocess a video in Compressor using AppleScript, and it did work well unless I was to set a destination for the target.

 

Here is the AppleScript:

 

set newVideo to "path:to:the:video" as string

 

tell application "Compressor"

  open newVideo

  make new target in job 1 of front document

          set setting of target 1 of job 1 of front document to setting 1 of setting group 1 of setting group 1 --choose setting "1080p for Apple Devices (10 Mbps)"

          set name of target 1 of job 1 of front document to "Converted"

end tell

 

The result:

 

Screen Shot 2012-11-20 at 7.07.37 PM.png

It says that I need to set a proper destination (a folder which can write) if I want to submit the target.

However, once I was trying to set the destination by executing the code as follows, it turns out something wrong.

 

set destination of target 1 of job 1 of front document to destination 3

--destination 3 is "Source"

 

The result:

Screen Shot 2012-11-20 at 7.16.42 PM.png

 

Can sombody tell me how to set the target destination properly?

 

Many, many thanks.

Troy

Compressor, OS X Mountain Lion (10.8.2)
  • Russ H Level 6 Level 6 (12,870 points)
    Currently Being Moderated
    Nov 20, 2012 7:49 AM (in response to troy7l)

    Have you tried defining destination differently – say, creating an output folder for your files?

     

    Also, have you used droplets?

     

    Russ

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.