Advertisement
westor

get_rate alias

Nov 15th, 2014
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.43 KB | None | 0 0
  1. alias get_rate {
  2.   .comopen Rating iTunes.Application
  3.   if ($comerr) { goto error }
  4.   if ($com(Rating,CurrentTrack,3,dispatch* Track)) {
  5.     if (!$com(Track)) { goto error }
  6.     var -s %k = $com(Track,Rating,2)
  7.     var -s %n = $com(Track).result
  8.     var -s %rating = $+($str(*,$calc(%n /20)),$chr(2),$str(-,$calc(5 - (%n /20))),$chr(2))
  9.   }
  10.   :error
  11.   while ($com(0)) { .comclose $com(1) }
  12.   if (%rating) { echo -a RATE: %rating }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement