I've been searching ages to try and find a shortcut to do this. Right-clicking and having to select something is very tedious.
I'd rather just be able to press a key and it adds it. Much quicker.
Any ideas how to do this? Maybe Apple Script?
[b][color=blue]tell[/b] application[/color] "iTunes"
[b][color=blue]if [/b]selection[b] is not[/color][/b] {} [b][color=blue]then[/b][/color]
[b][color=blue]my[/color][/b] [color=green]addNextSong[/color][color=black]([/color][color=blue]item 1 of selection[/color][color=black])[/color]
[b][color=blue] end if
end tell[/b][/color]
[b][color=blue]on [/b][/color][color=green]addNextSong[/color][color=black]([/color][color=green]trackID[/color][color=black])[/color]
[b][color=blue]tell [/b]application [/color]"iTunes"
[b][color=blue]set [/b][/color][color=green]thePlaylist[/color][b][color=blue] to[/b] playlist [/color]"Party Shuffle"
[color=blue]duplicate[/color][color=green] trackID [/color][color=blue]to[/color][color=green] thePlaylist[/color]
[b][color=blue]end tell
end [/b][/color][color=green]addNextSong[/color]
Yeh, that's what I done but I can't get iTunes to run the script when I press the shortcut combination.
I put the script name as the menu title.
Cheers.
does it run just by selecting it from the menu?
Yeah it runs. How do I assign a shortcut for that? It isn't a menu item is it?
Thought it was something stupid!
I went to the script menu on the right of the screen and it had a pointer to the iTunes script folder in Home --> Library --> Scripts --> Applications --> iTunes.
Got it working now, thanks for your help. Only problem now is when I run the script the music cuts out for a fraction of a second...maybe I need to tweak the script.
try
play thePlaylist
end try
Yeah, was Doug's scripting with a few others that I pieced together a simplified version.
Turns out it is this part of the code:
Code:try play thePlaylist end try
That was causing it to pause briefly. Idea of that was to start playing Party Shuffle if it wasn't already playing when a song is added.
But I guess it is better without that, since it just replicates exactly the function 'Add to Party Shuffle - that doesn't start playing the playlist when a song is added.
I'll update the code above incase others want to use that.
Well you could make it check before it plays it. But that would be more work. 🙂
Added in an If statement to check whether it was playing first or not and it worked, but I prefer being able to pause Party Shuffle and still add things to the playlist without causing it to start playing again.
Cheers for all your help by the way!