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: 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 | # ]