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: type88 on Mar 15, '07 06:59:27PM

Just what I always wanted!

What would make it even better would be if the "STOP" dialog could have a mechanism to rate the song you are playing an excerpt from. I do my best to stay on top of rating my songs and this would be a tremendous help. Is it doable?



[ Reply to This | # ]
Temporarily play an excerpt of an iTunes song
Authored by: Unsoluble on Mar 15, '07 09:55:15PM
This isn't exactly the solution you were thinking of, but you might want to try out Synergy. It lets you set up global keyboard commands for iTunes. I use it to change star ratings for the currently playing song even when I'm in another app -- I'm using Control-Up Arrow and Down Arrow, which are pretty convenient.

[ Reply to This | # ]
Temporarily play an excerpt of an iTunes song
Authored by: mwncimelyn on Mar 16, '07 08:21:29AM

This script should do it.

tell application "iTunes"
set currentTrack to current track
set playPosition to player position
set theSampleTrack to selection
play selection
set player position to 50
set theRating to (choose from list {1, 2, 3, 4, 5} with prompt "Please set your rating then click OK" without multiple selections allowed) as integer
set theSampleTrack to current track
if theRating is not false then set the rating of theSampleTrack to theRating * 20
play currentTrack
set player position to playPosition
end tell

I've changed my script to this now - thanks for the tip.



[ Reply to This | # ]
Temporarily play an excerpt of an iTunes song
Authored by: mark hunte on Mar 16, '07 09:17:01AM
The new script works well. Can I suggest you add 0 to the ratings. And a default :
set theRating to (choose from list {0, 1, 2, 3, 4, 5} with prompt "Please set your rating then click OK" default items "0" without multiple selections allowed) as integer

---
mh

[ Reply to This | # ]

Temporarily play an excerpt of an iTunes song
Authored by: mark hunte on Mar 16, '07 11:24:10AM
Actually this works a little better. The default will be what Ever the current rating is for the sample track.
So if the sample has no rating then the default selection will be 0
If its 3 the default will be 3.
tell application "iTunes"
	set currentTrack to current track
	set playPosition to player position
	set theSampleTrack to selection
	play selection
	set player position to 50
	set R to (rating of current track) / 20 as integer
	set theRating to (choose from list {0, 1, 2, 3, 4, 5} with prompt "Please set your rating then click OK" default items R without multiple selections allowed) as integer
	set theSampleTrack to current track
	if theRating is not false then set the rating of theSampleTrack to theRating * 20
	play currentTrack
	set player position to playPosition
end tell 

---
mh

[ Reply to This | # ]

Temporarily play an excerpt of an iTunes song
Authored by: type88 on Mar 16, '07 11:39:54AM

Works a dream. Thank you.



[ Reply to This | # ]