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


Click here to return to the 'Temporarily play an excerpt of an iTunes song' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Temporarily play an excerpt of an iTunes song
Authored by: drudus on Mar 16, '07 07:32:43PM
Great idea. I added an extra if clause to TheCrunge's script to check if a track is playing...

tell application "iTunes" if player state is equal to playing then set answer1 to "Revert" set answer2 to "Let This Play" set answer3 to "Play This From Beginning" set playerOffset to 50 --seconds set currentTrack to current track set playPosition to player position set theSampleTrack to selection play selection set player position to playerOffset set theChoice to (display dialog "Sampling Track..." buttons {answer2, answer3, answer1} default button 3) if button returned of theChoice is answer1 then play currentTrack set player position to playPosition else if button returned of theChoice is answer2 then return else if button returned of theChoice is answer3 then set player position to 0 end if end if end tell

You can also set a shortcut to Apple Scripts installed in an application by entering the script name in the keyboard shortcuts in the System Preferences. Good work.

[ Reply to This | # ]