iTunes Select Playlist

Hi folks. I want to navigate iTunes. I want to have the itunes window just choose a playlist names “alpha”. That’s it.

I don’t want a reference to it. I don’t want it to play. I don’t want to purchase anything. I just want to have iTunes to activate with a playlist chosen. That’s it.

Tried select, reveal, get properties. I can’t seem to get anything going, and all of the script examples I’ve found online want to update podcasts, play next tune, etc. I don’t want to play anything.

Any advice appreciated.

Cheers

Change “alpha” to any playlist you have created in the library.


tell application "iTunes"
	set view of front browser window to user playlist "alpha" of source "Library"
end tell

Well, the solution is correct, thanks . But, to bring the selected playlist to front is need 2 additional instructions:


tell application "Music" -- or, "iTunes" on old sysytems
	activate
	set view of front browser window to user playlist "alpha" of source "Library"
	set visible of front browser window to true
end tell

Choose playlist name version:


tell application "Music"
	activate
	set sourcesNames to name of every source
	set theChoice to choose from list sourcesNames with prompt "PLEASE SELECT THE SOURCE"
	if theChoice is not false then
		set theSourceName to item 1 of theChoice
		set playlistNames to name of every playlist of source theSourceName
		set theChoice to choose from list playlistNames with prompt "PLEASE SELECT THE PLAYLIST"
		if theChoice is not false then
			set selectedPlayList to playlist (item 1 of theChoice) of source theSourceName
			set view of front browser window to selectedPlayList
			set visible of front browser window to true
		end if
	end if
end tell

Try the REVEAL

tell application "iTunes"
		try
			--activate
			set frontmost to true
                        delay 0.2
			--(current application's NSThread)'s sleepForTimeInterval:0.2
			set thePlaylist to user playlist "alpha" of source id 64
			delay 0.2
                        --(current application's NSThread)'s sleepForTimeInterval:0.2
			reveal thePlaylist	
		end try
end tell