Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

iTunes 11: Use Up Next to play one song then stop playback Apps
The AppleScript I provided previously for this doesn't work in iTunes 11, but Up Next can be used instead.

I previously submitted this AppleScript to provide a way to play one song then stop playback in iTunes. The script doesn't work in iTunes 11, but Up Next can be used instead. Also, using this method, it can be accomplished entirely from the keyboard. (It's important to note that "All controls" must be checked at the bottom of the Keyboard Shortcuts tax tab in the Keyboard pane of System Preferences.)

The objective is to be able to select a single song in a playlist, make it start playing, then prevent playback from continuing after the song has been played in its entirety. This can be done in iTunes 11 by selecting a song to play using alternating key presses of Tab, Shift-Tab, Up Arrow and Down Arrow. The next step is most important: open the Up Next list with Command-Option-U, and check to be sure no titles appear in the list (if there are any, press Tab until the "Clear" button is highlighted, then press the spacebar to "click" that button; otherwise press Escape or Command-Option-U again to exit the list), then press Return to play the song. You can pause and resume the song with spacebar if desired, and playback will still stop at the end of the song as long as you don't add anything to the Up Next list in the meantime.

[kirkmc adds: This does seem a bit complicated, but there's no way to use AppleScript to manipulate the Up Next queue, unfortunately.]
    •    
  • Currently 3.14 / 5
  You rated: 1 / 5 (7 votes cast)
 
[9,488 views]  

iTunes 11: Use Up Next to play one song then stop playback | 4 comments | Create New Account
Click here to return to the 'iTunes 11: Use Up Next to play one song then stop playback ' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
iTunes 11: Use Up Next to play one song then stop playback
Authored by: hypert on Dec 11, '12 09:22:07AM

So, to sum it up, you just press RETURN to play the currently selected song? Assuming your UP NEXT is empty of course.



[ Reply to This | # ]
iTunes 11: Use Up Next to play one song then stop playback
Authored by: llee on Dec 11, '12 03:02:23PM

Unfortunately, after submitting this hint, I discovered that pressing return to start playback can't always be trusted not to populate the Up Next list. Because of that it may sometimes be necessary to clear the list after starting playback, which isn't ideal. Pressing option-return to add only the selected song to Up Next, then closing the list pop-up view before starting playback may be more successful for playing just one selection once, but pausing and resuming sometimes results in adding more playback instances to Up Next. I'm hoping that some refinement of key shortcut functions for Up Next is forthcoming.



[ Reply to This | # ]
iTunes 11: Use Up Next to play one song then stop playback
Authored by: llee on Jan 02, '13 07:02:56AM

What I've been doing to accomplish this most successfully in version 11.0.1 of iTunes is first to make sure the Up Next list is empty, select the song in the playlist, press opt-return to add the song to Up Next, press cmd-opt-U to open the Up Next list, press the down arrow to select the song in Up Next, press return to begin playback, then optionally press escape to close the Up Next list, which is emptied when the selected item is played by pressing return.



[ Reply to This | # ]
iTunes 11: Use Up Next to play one song then stop playback
Authored by: llee on Oct 05, '13 01:20:54AM

I've replaced my original AppleScript with the following, which seems to work OK in iTunes 11.1.1 if you:
1) press cmd-opt-u and clear your up next list before you use it, and
2) be sure "Enable access for assistive devices" is turned on (allow UI scripting)


tell application "iTunes" to activate
tell application "iTunes" to play selection with once
do shell script "sleep .5"
tell application "System Events"
keystroke "u" using {command down, option down}
keystroke (key code 125)
keystroke return
keystroke (key code 53)
end tell



[ Reply to This | # ]