|
|
Temporarily play an excerpt of an iTunes song
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. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.08 seconds |
|