• 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: iTunes Playlist Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes Playlist Script


  • Subject: Re: iTunes Playlist Script
  • From: Jon Wynacht <email@hidden>
  • Date: Thu, 17 Feb 2005 07:16:05 -0800

Hi Matthew,

Thanks for the feedback on the script. As for the time error, I just wrote it wrong ;-)

I like your script but I like your idea of accessing the smart playlist more. How would I access the playlist name? I tried using the actual name but that didn't work.

Thanks,

Jon

On Feb 15, 2005, at 10:08 PM, Matthew Smith wrote:

on 16/02/2005 16:40, Jon Wynacht at email@hidden wrote:

New to this list and new to AppleScript...I checked the archives but
couldn't find what I was looking for so I thought I'd throw this out to
you all.


I load a bunch of new music into iTunes every month and it would be
nice for every CD that I import a playlist gets made with the artist
and the title as the tag for that playlist. I found a script by Doug
Adams called "Arrange By Artist - Album" for iTunes but it does it for
my whole library.

I figured this would be a good foray into AppleScript so I began
modifying things, mainly adding this:

set theDate30DaysAgo to (current date) - (30 * days)

and changing this:

set numAllTracks to (get count of lib's file tracks)

to this:

set numAllTracks to (get count of lib's file tracks where date added >
theDate30DaysAgo)

But when I run it I get this message:

AppleScript Error: Can't get 3346 whose date added > date "Sunday,
January 16, 2005 9:93:29 PM".

How about:

tell application "iTunes"
    set trackList to every file track of playlist "Library" of source
"Library" whose date added > date "Sunday, January 16, 2005 00:00:00"
    set numAllTracks to count of trackList
end tell

Of course you could always have a smart playlist that had all tracks added
in the last 30 days and then used the tracks in this playlist to create
others.


How come the time part in the message you received says 9:93:29 PM???

-- Matthew Smith


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: iTunes Playlist Script
      • From: Matthew Smith <email@hidden>
References: 
 >Re: iTunes Playlist Script (From: Matthew Smith <email@hidden>)

  • Prev by Date: Re: Date handlers
  • Next by Date: Menus Smile hexagonaux.
  • Previous by thread: Re: iTunes Playlist Script
  • Next by thread: Re: iTunes Playlist Script
  • Index(es):
    • Date
    • Thread