Advertisement
westor

ITunes rating alias

Nov 15th, 2014
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.60 KB | None | 0 0
  1. alias setrating_command {
  2.   if (!$1-) { return }
  3.   var %p = iTunes, %i = IITTrack
  4.   .comopen iTunes iTunes.Application
  5.   if ($comerr) { .timeriTunes off | goto error }
  6.   if $com(%p,CurrentTrack,3,dispatch* %i) {
  7.     if (!$com(%i)) {
  8.       .msg $1 [ $+ $2 $+ ]: Error, NOT any track is currently has been selected.
  9.       goto error
  10.     }
  11.     var -s %k = $com(%i,Rating,4,long,$calc($3 *20))
  12.     var -s %k = $com(%i,Name,2)
  13.     var -s %n = $com(%i).result
  14.     .msg $1 [ $+ $2 $+ ]: Song ratings for $qt(%n) has been changed to $qt($3) $+ .
  15.   }
  16.   :error
  17.   while ($com(0)) { .comclose $com(1) }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement