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


Click here to return to the 'Even better, use an applescript.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Even better, use an applescript.
Authored by: nsarup on Jul 22, '02 09:19:01AM

Heres the sort of finished script:

tell application "iTunes"
set theRating to the rating of current track
if theRating is less than or equal to 80 then
set the rating of the current track to theRating + 20
end if
end tell

Now, its not as fast as I wanted it to be. if I save it as an application it has to start each time I want to increase the rating.
Is a shell script faster and where can I find info on how to send the above script from a shell script?



[ Reply to This | # ]
He, another one ;)
Authored by: nsarup on Jul 22, '02 09:58:15AM

Hehe it seems Im conversing with myself ;)
Here a new and improved script. It stays open and is nearly instantanious (right spelled?) when called after it has started up:


on run
increaseRating()
end run

on reopen
increaseRating()
end reopen

on increaseRating()
tell application "iTunes"
set theRating to the rating of current track
if theRating is less than or equal to 80 then
set the rating of the current track to theRating + 20
end if
end tell
end increaseRating



[ Reply to This | # ]