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

Click here to return to the 'Too complicated?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Too complicated?
Authored by: david-bo on Oct 15, '10 03:02:41AM

How do you use your onliner? I try executing it using either osascript or script editor but nothing happens, iTunes just continue playing when the current track is finished.

Koala Surf Camp

[ Reply to This | # ]
Too complicated?
Authored by: applescripter on Oct 15, '10 03:41:49AM
Sorry misread original post, for this script to work the song needs to be paused then played using this script

try this instead

tell application "iTunes"

set t to current track

if player state is playing then

set pos to player position

set dur to duration of t

set e to dur - pos - 2

delay e


end if

play t with once

end tell

It pauses the track near to the end (to minimise disruption) then plays it with once specified

[ Reply to This | # ]