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


Click here to return to the 'iTunes, the menu bar, unicode, and GeekTool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
iTunes, the menu bar, unicode, and GeekTool
Authored by: nigeltufnel on Feb 13, '09 05:59:53PM

Here is my adaptation building on the above outstanding work. It results in this output:


iTunes: Song - Artist (Album) | rating | progress%


if there is no album then that field is dropped
if there is no rating then that field too is dropped

it will cause iTunes to open at login which I think is great!


tell application "iTunes"
set trackname to name of current track
set artistname to artist of current track
set albumname to album of current track
if albumname is null then
set albumshow to " "
else if albumname is "" then
set albumshow to " "
else
set albumshow to " ( " & albumname & " ) "
end if
set trackduration to duration of current track
set trackposition to player position
set elapsed to round (trackposition / trackduration * 100)
set myRating to round ((rating of current track) / 20)
if myRating is 1 then
set myRating to "| * "
else if myRating is 2 then
set myRating to "| ** "
else if myRating is 3 then
set myRating to "| *** "
else if myRating is 4 then
set myRating to "| **** "
else if myRating is 5 then
set myRating to "| ***** "
else
set myRating to ""
end if
set myRating to myRating
set output to "iTunes: " & trackname & " - " & artistname & albumshow & myRating & "| " & elapsed & "%"
end tell

---
These go to eleven.



[ Reply to This | # ]