Re: iTunes Playlist Script
Re: iTunes Playlist Script
- Subject: Re: iTunes Playlist Script
- From: Matthew Smith <email@hidden>
- Date: Wed, 16 Feb 2005 17:08:25 +1100
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:
This email sent to email@hidden