• 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
file list as data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

file list as data


  • Subject: file list as data
  • From: "Jan E. Schotsman" <email@hidden>
  • Date: Tue, 22 Jul 2014 21:13:37 +0200

Hello,

I need to make a script for a user that passes a file list as data.

--script that converts the movie files in folder <myFolder> inside the movies folder

set moviesFolder to path to movies folder from user domain

tell application "System Events"
	set myMoviesfolder to folder "<myFolder>" of moviesFolder
set myMoviesList to files of myMoviesfolder whose kind is "QuickTime Movie"
		tell application "JES Deinterlacer"
			make new project with data {preset:"2x speed", file:myMoviesList}
		end tell
	end tell
end tell

-- end script

This results in the error "Can't make file [...] into the expected type
I tried file:myMoviesList as alias list but this doesn't even compile

I can convert one file like this:

		set thePath to POSIX path of item 1 of myMoviesList
		tell application "JES Deinterlacer"
make new project with data {preset:"2x speed", file:POSIX path thePath}
		end tell

Don't ask me why this works but it does (maybe I was just lucky when a wrote the script this way the first time).
What I need is {POSIX file thePath1 , POSIX file thePath2}

I tried

	set thePosixFileList to {}

	repeat with movieFile in myMoviesList
		set thePath to POSIX path of movieFile
		set posixFile to POSIX file & thePath
		set thePosixFileList to thePosixFileList & posixFile
	end repeat

Now I get

{POSIX file, thePath1 , POSIX file, thePath2}

Where tf do the commas come from? I don't want the comma's.
Please help!

Jan E.


_______________________________________________
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


  • Follow-Ups:
    • Re: file list as data
      • From: Christopher Stone <email@hidden>
    • Re: file list as data
      • From: Shane Stanley <email@hidden>
    • Re: file list as data
      • From: "koenig.yvan" <email@hidden>
    • Re: file list as data
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Setting Password on PDFs
  • Next by Date: Re: file list as data
  • Previous by thread: Re: Setting Password on PDFs
  • Next by thread: Re: file list as data
  • Index(es):
    • Date
    • Thread