• Home
  • Servers
  • Chat
  • Channels
  • Commands
  • Forum
  • FAQ
  • Software
  • Quotes
Topic Options
Rate This Topic
#3215 - 09/17/08 12:31 AM itunes
borat Offline
n00b

Registered: 07/22/08
Posts: 3
Loc: colorado
can someone help me make a script where i can type !itunes or something and it will show what i'm playing

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top
#3216 - 09/17/08 02:03 PM Re: itunes [Re: borat]
TuxedoJericho Offline
newbie

Registered: 12/24/07
Posts: 42
Loc: Whitesburg, TN
This is the scirp I found by using google to search for mirc itunes.

It has a control window that allows you to access itunes, the script was from http://lights-retinue.dk/npscript/

Code:
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 "npRemote iTunes"
  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
  }
}

_________________________
I am Gary "TuxedoJericho" Greenlee, and I support this message.

Top
#3217 - 09/17/08 04:47 PM Re: itunes [Re: borat]
Jerry Offline
newbie

Registered: 04/27/08
Posts: 35
Loc: New Jeresy, USA
check the internet for stuff like that, I see it out there all the time... I just never choose to remember names because I wouldn't use something like that...
_________________________
--Jerry Smith
#Jerry, #macfan406, #iPhone, #nick
http://jerrysmith.us.to

Top
#3220 - 09/18/08 09:23 PM Re: itunes [Re: Jerry]
iPhone Offline
Over 100 posts

Registered: 03/08/08
Posts: 118
Loc: New Jersey
some IRC clients like Linkinus, Colloquy, and XChat have those scripts preinstalled. Usually its /iTunes and gives you what you're playing. Linkinus and Colloquy are for the Mac, Xchat is for the PC.
_________________________
-Kevin C. Nunez, CEO and Founder of #iPhone on WyldRyde

Top
#3221 - 09/18/08 09:34 PM Re: itunes [Re: iPhone]
boredcollegekid Offline
newbie

Registered: 12/19/07
Posts: 48
Loc: Tulsa, OK
Xchat does not have a now playing script preinstalled. The most used one is probably AMIP, and you could code an announce alias I'd assume
_________________________

Top


Moderator:  Jeff, mandy, usrbingeek