• 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
Problems using Applescript for duplicating a file and adding to an iTunes playlist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems using Applescript for duplicating a file and adding to an iTunes playlist


  • Subject: Problems using Applescript for duplicating a file and adding to an iTunes playlist
  • From: Paul Taylor <email@hidden>
  • Date: Wed, 21 Dec 2011 14:34:03 +0000

I'm having problem trying to take a track from one itunes playlist and adding it to another, this used to work now it doesnt but I dont know if it doesnt work at all just in my test case

This is my test:

tell application "iTunes"
set mainlibrary to library playlist 1
set list_of_folders to get every folder playlist
set new_playlistfolder to item 1 of list_of_folders
set new_playlist to (make user playlist in new_playlistfolder with properties {name:"TestPlayList"})
try
set existtrack to (first file track of mainlibrary whose database ID = 14265)
duplicate existtrack to new_playlist


on error err_mess
log err_mess
end try
end tell


and this is what I get when I run it in Applescript editor

tell application "iTunes"
get library playlist 1
--> library playlist id 14395 of source id 72
get every folder playlist
--> {folder playlist id 27010 of source id 72, folder playlist id 29459 of source id 72}
make with properties {name:"TestPlayList"} at folder playlist id 27010 of source id 72 new user playlist
--> user playlist id 29721 of source id 72
get file track 1 of library playlist id 14395 of source id 72 whose database ID = 14265
--> file track id 20505 of library playlist id 14395 of source id 72
copy file track id 20505 of library playlist id 14395 of source id 72 to user playlist id 29721 of source id 72
--> error number -1708
(*iTunes got an error: Can’t set user playlist id 29721 of source id 72 to file track id 20505 of library playlist id 14395 of source id 72.*)
end tell



Any ideas.

thanks Paul
_______________________________________________
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: Problems using Applescript for duplicating a file and adding to an iTunes playlist
      • From: Alex Zavatone <email@hidden>
    • Re: Problems using Applescript for duplicating a file and adding to an iTunes playlist
      • From: "J. Stewart" <email@hidden>
  • Prev by Date: Satimage OSAX and Console messages.
  • Next by Date: Re: Satimage OSAX/Console
  • Previous by thread: AppleScript Help
  • Next by thread: Re: Problems using Applescript for duplicating a file and adding to an iTunes playlist
  • Index(es):
    • Date
    • Thread