file list as data
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