iTunes Now Playing Script

By EthanBest on Jan 31, 2010

My iTunes Now Playing Script. Paste into Remotes. Alias is /np

Got any questions or comments please post below.

Thanks!

alias itunes {
  if ($1 == open) {
    .comopen itunes itunes.application
    .echo -a $comerr
  }
  if ($1 == play) { 
    .set %play $com(itunes,PlayPause,3)
    /track
    if (!%play) {
      .echo -a iTunes may not be open.
    }
  }
  if ($1 == Next) {
    .set %next $com(itunes,NextTrack,3)
    /track
    if (!%next) {  
      .echo -a iTunes may not be open.
    }
  }
  if ($1 == Previous) {
    .set %Previous $com(itunes,PreviousTrack,3)
    /track
    if (!%Previous) {
      .echo -a iTunes may not be open.
    }
  }
  if ($1 == Stop) { 
    .set %stop $com(itunes,Stop,3)
    if (!%stop) {
      .echo -a iTunes may not be open.
    }
  }
}
alias np {
  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)
  .set %artist $com(CurrentTrack).result
  .echo -q $com(CurrentTrack,Album,3)
  .set %album $com(CurrentTrack).result
  .echo -q $com(CurrentTrack,Name,3)
  .set %name $com(CurrentTrack).result
  /me  4np: 8 %name 4by: 8 %artist 4from: 8 %album 
} 

Comments

Sign in to comment.
The6PuffPack   -  Dec 14, 2011

I got it all.... If you would like photo proof I'll give it to you. @KilllerX

 Respond  
KilllerX   -  Dec 12, 2011

Well, I have used this before, and it worked as is, Unless you didn't copy the whole thing. But that is about the only thing I can think off.

 Respond  
The6PuffPack   -  Dec 11, 2011

Well KilllerX, it didn't work for me before, then I tried that, and guess what? It worked.

 Respond  
KilllerX   -  Dec 10, 2011

The6puff... Why would you have an opening bracket before you even has an identifier. You need to identify the command first. So saying it should be
{alisas Itunes

Is redundant and incorrect. AS it would cause an error in your coding.

 Respond  
Jonesy44   -  Dec 10, 2011

^jokes?

 Respond  
The6PuffPack   -  Dec 10, 2011

http://pastebin.com/XBCBSc6v A bit of a fix up..

 Respond  
ZachACook   -  Jun 05, 2011

could you please add or tell me how to add the position that the song is in (timewise)

 Respond  
iBen95111   -  Apr 22, 2010

woops, wrong one ignore this.

 Respond  
sunslayer   -  Apr 05, 2010
xplo   -  Apr 04, 2010

young fucking ripper again,
Original post is: http://www.hawkee.com/snippet/7027/

 Respond  
rsb   -  Mar 04, 2010

Yea thanks bro. Didn't even think of that. Figured it was just magic yaknow?

 Respond  
Korvin   -  Mar 03, 2010

you need to have itunes running..

 Respond  
rsb   -  Mar 03, 2010

Nifty

 Respond  
Jethro   -  Feb 01, 2010

You must be Master-Of-Death's evil twin, EthanBest...lol

 Respond  
TheNitelyfe   -  Jan 31, 2010

wow

 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.