• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: file list as data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file list as data


  • Subject: Re: file list as data
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 22 Jul 2014 19:12:29 -0500

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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >file list as data (From: "Jan E. Schotsman" <email@hidden>)

  • Prev by Date: Re: file list as data
  • Next by Date: Re: file list as data
  • Previous by thread: Re: file list as data
  • Next by thread: Re: file list as data
  • Index(es):
    • Date
    • Thread