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

Another way to have iTunes pause after playing Apps
This hint is a followup to this previous hint.

It provides an alternative to clicking a selected track in iTunes then hitting the play button. That action, of course, results in continued playback until the rest of the playlist to which the track belongs has finished playing, whereas running the script results in cessation of playback after the selected track has finished playing. If multiple tracks are selected, only the last selected track plays. Keyboard shortcuts remain available for controlling transport actions while the track plays. To give the script a keyboard shortcut (emphatically recommended), use the instructions found here (among other places). I gave mine the shortcut Command+Option+P. Works in 10.6.4 with iTunes 10.0.1.

Type the following script into AppleScript Editor:

tell application "iTunes" to play selection with once

Save the script to ~/Library/iTunes/Scripts or Library/iTunes/Scripts to use the keyboard shortcut method referenced above.

[crarko adds: I tested this, and it works as described. I saved the script to ~/Library/Scripts/Applications/iTunes so I could select it from the Scripts menu while in iTunes, and that worked fine too. There is a wealth of other good scripts available at Doug's AppleScripts for iTunes, which is linked to above.]
  • Currently 3.80 / 5
  You rated: 4 / 5 (5 votes cast)

Another way to have iTunes pause after playing | 2 comments | Create New Account
Click here to return to the 'Another way to have iTunes pause after playing' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another way to have iTunes pause after playing
Authored by: tobylane on Dec 02, '10 03:56:23AM

Is there a way to modify this to stop playing after selection?

[ Reply to This | # ]
Another way to have iTunes pause after playing
Authored by: llee on May 16, '13 07:47:58PM

As of iTunes 11.0.3, this AppleScript again works to play selected track then stop.

tell application "iTunes"
reveal selection
play selection with once
end tell

[ Reply to This | # ]