You are here: Home robotic thoughts... 2008 December 11 AppleScripting Missing iTunes Party Shuffle Features

AppleScripting Missing iTunes Party Shuffle Features

Filed Under:

My name is claytron and I'm a party shuffle addict.  There, I said it.  In my opinion the iTunes party shuffle feature is pure awesomeness.  I have been using it like mad since it was introduced.  I'm still amazed when I talk to iTunes users that haven't used it.

My typical modus operandi is to set the party shuffle to a rated smart playlist (3 stars and up or 4 stars and up).  Then if i want to add an album in the mix I can select it and 'Play Next in Party Shuffle' or 'Add to Party Shuffle'.  This is where AppleScript can come in handy.  Doug Adams wrote a nifty little AppleScript that allows you to select a track and add that track's album to the party shuffle!  This really comes in handy when my eMusic downloads arrive in iTunes.  I can sort my library by 'Date Added' and then select a track from one of the newly imported albums and have it start playing next in the party shuffle.  Totally effing awesome.

So herein lies the next issue.  Let's say I just downloaded five albums and imported them into iTunes.  You would think you could highlight a track from each album and then use the 'Play Next in Party Shuffle' script.  But instead it pops up with a selection dialog with all the albums in your library.  For me this is completely useless, I have 2000+ albums.  So I went ahead and modified the script to add the album for each selected track.

After doing so I emailed Doug about the modifications.  As you might guess, he gets a ton of emails with modifications and fixes for all the scripts posted on his site and can't possibly include them all.  I also don't think he quite understood the purpose of the modification.  But since most of the scripts are licensed under the GPL you can still benefit from my mods!

There are two scripts.  The first one is the 'Play Album(s) Next in Party Shuffle'  which allows you to select one or more tracks and have each track's album be cued up next in party shuffle.  The second script is 'Add Album(s) to Party Shuffle' which does the same thing except it adds the album to the end of the party shuffle.  That way you don't have to add an album in the middle of another!

Both of these scripts require that the party shuffle is currently playing.  I couldn't find a way around that in AppleScript (but I'm still an AppleScript n00b).  The only other item to mention is that I added a property to the top of each script called 'show_party_shuffle'.  If this is true then you'll be taken to the party shuffle after adding the tracks.  If you don't want to be switched over, you can set it to false.

Document Actions


Posted by The Dude at Jan 24, 2009 11:24 AM
Nice work! I found out about Doug's script (which is cool), and was happy to see some one extended it this way.


Posted by claytron at Jan 24, 2009 04:09 PM
Your comment reminded me that I needed to update the scripts. See the results here:[…]/applescript-party-shuffle-part-two

Party shuffle missing

Posted by Angela at Jul 07, 2009 11:26 PM
Please please please help me!
I am no PC whizz and have fallen for itunes and especially partyshuffle.
I am a very amateur DJ just doing partys for friends. I have one coming up but have lost my party shuffle! I'm starting to panic. Please has anyone got some help for me!!!!!!!!!!