MIRC iTunes Script NowPlaying + Remote

By Michael-TV on Jul 12, 2009

Hello And welcome to Michael-TV Scripts
This is a Script which allows you to show others what you are currently listening on your ITunes

To use this script you have to right click into a channel in your MIRC

If you Have any Questions or needs some help or maybe just wana chat with me and my community feel free to join irc.localcoast.net #Michael-TV

...:::{ Thank you very much!!!!! }:::...

;...:::@@@   Michael-TV  irc.localcoast.net #Michael-TV @@@:::...
on *:load: { 
  echo 12 -a You Have Just Loaded Michael-TV´s ITunes Now Playing & Remote Script °Copyright2009 
  echo 12 -a A Michael-TV Inc. Production
}

on *:START:{
  if (%np.ontop == on) {
    /dialog -mdieo npRemote npRemote
  }
  else {
    /dialog -mdien npRemote npRemote
  }
}

on *:LOAD:{
  %np.ontop = on
  %np.lyrics = on
  /dialog -mdieo npRemote npRemote
}

alias gettrack {
  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

  %output =  $+ $chr(91) %artist - %title $chr(93) $+ 

  %subbedTitle = $replace(%title,$chr(32),$chr(37) $+ 20)
  %subbedTitle = $remove(%subbedTitle,&)

  if (%np.lyrics == on) {
    %output = %output - lyrics @ http://binzlyrics.lir.dk/?t= $+ %subbedTitle
  }

  return %output

}

alias getcbtrack {
  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

  %output = $chr(91) %artist - %title $chr(93)

  %subbedTitle = $replace(%title,$chr(32),$chr(37) $+ 20)
  %subbedTitle = $remove(%subbedTitle,&)

  if (%np.lyrics == on) {
    %output = %output - lyrics @ http://binzlyrics.lir.dk/?t= $+ %subbedTitle
  }

  return %output

}

alias np {
  /scid $activecid describe $active np: $gettrack
}

alias npEcho {
  echo -a iTunes np: $gettrack
}

alias npClipboard {
  clipboard iTunes np: $getcbtrack
}

menu channel,query,chat {
  .Now playing:/np
}

menu status,channel,query,nicklist,menu,chat {
  .npRemote:{
    if (%np.ontop == on) {
      /dialog -mdieo npRemote npRemote
    }
    else {
      /dialog -mdien npRemote npRemote
    }

  }

}

dialog npRemote {
  title "Michael-TV iTunes Remote"
  size -1 -1 184 90
  option pixels

  button "< prev", 1, 0 0 40 20, push
  button "play/pause", 2, 40 0 70 20, push
  button "stop", 3, 110 0 30 20, push
  button "next >", 4, 140 0 44 20, push
  button "np", 5, 0 20 27 20
  button "echo np", 6, 27 20 57 20, push
  button "np to clipboard", 7, 84 20 100 20, push
  button remote always on top: %np.ontop, 8, 0 45 184 20, push
  button lyrics in np output: %np.lyrics, 9, 0 70 184 20, push
}

on *:DIALOG:npRemote:SCLICK:1:{
  if (!$com(itunes)) {
    /comopen itunes iTunes.Application
  }
  %com.result = $com(itunes,PreviousTrack,3)
  if (%com.result==0) {
    echo -a npRemote error: Make sure iTunes is open.
  }
}

on *:DIALOG:npRemote:SCLICK:2:{
  if (!$com(itunes)) {
    .comopen itunes iTunes.Application
  }
  %com.result = $com(itunes,PlayPause,3)
  if (%com.result==0) {
    echo -a npRemote error: Make sure iTunes is open.
  }

}

on *:DIALOG:npRemote:SCLICK:3:{
  if (!$com(itunes)) {
    .comopen itunes iTunes.Application
  }
  %com.result = $com(itunes,Stop,3)
  if (%com.result==0) {
    echo -a npRemote error: Make sure iTunes is open.
  }
}

on *:DIALOG:npRemote:SCLICK:4:{
  if (!$com(itunes)) {
    .comopen itunes iTunes.Application
  }
  %com.result = $com(itunes,NextTrack,3)
  if (%com.result==0) {
    echo -a npRemote error: Make sure iTunes is open.
  }
}

on *:DIALOG:npRemote:SCLICK:5:{
  /np
}

on *:DIALOG:npRemote:SCLICK:6:{
  /npEcho
}

on *:DIALOG:npRemote:SCLICK:7:{
  /npClipboard
}

on *:DIALOG:npRemote:SCLICK:8:{
  if (%np.ontop == on) {
    %np.ontop = off
    /dialog -n npRemote npRemote
    /did -r npRemote 8
    /did -a npRemote 8 remote always on top: %np.ontop
  }
  else {
    %np.ontop = on
    /dialog -o npRemote npRemote
    /did -r npRemote 8
    /did -a npRemote 8 remote always on top: %np.ontop
  }
}

on *:DIALOG:npRemote:SCLICK:9:{
  if (%np.lyrics == on) {
    %np.lyrics = off
    /did -r npremote 9
    /did -a npremote 9 lyrics in np output: %np.lyrics
  }
  else {
    %np.lyrics = on
    /did -r npremote 9
    /did -a npremote 9 lyrics in np output: %np.lyrics
  }
}

on *:DIALOG:npRemote:close:*:{
  if ($com(itunes)) {
    .comclose itunes
  }
}

Comments

Sign in to comment.
iBen95111   -  Apr 22, 2010

can you use lyrics.com? ; the original lyrics link doesn't work

 Respond  
xplo   -  Apr 08, 2010

if you want to copyright it, do not publish it

 Respond  
Andrew12   -  Jul 27, 2009

You can't copyright mirc scripts.. it's like releasing an Open Source app and then someone trying to edit it and its like NO.. -.-

 Respond  
Michael-TV   -  Jul 14, 2009

aha ok than Thanks for telling me Spanky :-)

 Respond  
Spanky   -  Jul 13, 2009

@Michael-Tv the com error isnt in your script its in his mirc..he has to go to select server lock and untick the Com option to unlock it..

 Respond  
Michael-TV   -  Jul 13, 2009

hehe ok @DragonHeart i will see if i can fix it.

Thanks for the responce :-)

All the best
Michael-TV

 Respond  
Spanky   -  Jul 12, 2009

@Dragonheat go to select server then scroll down to lock, then unlock you will see com has a tick by it untick it then this script should work..
@Michael-TV i cant test this out cus i dont use itunes, foobar for the win.
but it looks ok,

 Respond  
DragonHeart   -  Jul 12, 2009
  • Identifier locked in options dialog: $com (line 26, itunesnowplaying.mrc)
  • Identifier locked in options dialog: $com (line 147, itunesnowplaying.mrc)

Doesnt work

 Respond  
Michael-TV   -  Jul 12, 2009

Please Give us a feedback what do you think about it :-) Thank you very much :-)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.