Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias get_rate {
- .comopen Rating iTunes.Application
- if ($comerr) { goto error }
- if ($com(Rating,CurrentTrack,3,dispatch* Track)) {
- if (!$com(Track)) { goto error }
- var -s %k = $com(Track,Rating,2)
- var -s %n = $com(Track).result
- var -s %rating = $+($str(*,$calc(%n /20)),$chr(2),$str(-,$calc(5 - (%n /20))),$chr(2))
- }
- :error
- while ($com(0)) { .comclose $com(1) }
- if (%rating) { echo -a RATE: %rating }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement