On Jul 22, 2014, at 14:13, Jan E. Schotsman <email@hidden> wrote:I need to make a script for a user that passes a file list as data.
______________________________________________________________________
Hey Jan,
As far as I can tell JES Deinterlacer can take a list of aliases without a problem.
------------------------------------------------------------------------------------------- # This works. ------------------------------------------------------------------------------------------- set myMoviesfolder to alias ((path to movies folder from user domain as text) & "test_jes_deinterlacer:") tell application "Finder" set myMoviesList to (files of myMoviesfolder whose kind is "QuickTime Movie") as alias list end tell
# Conversion to Posix File Objects is apparently unnecessary. The alias list works. # Left in place to demonstrate a simple and fast means of conversion. # repeat with movieFile in myMoviesList # set contents of movieFile to POSIX file (POSIX path of movieFile) # end repeat
tell application "JES Deinterlacer" activate make new project with data {file:myMoviesList} end tell -------------------------------------------------------------------------------------------
But when I add in your preset the script fails.
Changing the preset to one used in the JES-D example script works but with complications. I'm guessing I don't have the app set up quite properly, but this is the first time I've looked at it and don't know.
The reason you were getting a comma in your file list between Posix File and the path is that you used the concatenation operator on unlike data types.
set a to "test" set b to POSIX file & a --> {POSIX file, "test"}
# The concatenation operator (&) concatenates text objects, joins record objects into a record, and joins other objects into a list. (From the Applescript Language Guide.)
A Posix file is a file object, and Posix file <posix path> resolves to one:
POSIX file (POSIX path of (path to downloads folder)) --> file "Ryoko:Users:chris:Downloads:"
HTH.
-- Best Regards, Chris
|