another itunes script with no crappy dialog

Platform:  mIRC
Published  Dec 15, 2009
Updated  Dec 15, 2009
Paste in ur remotes and save.
basically it has various commands.

To turn it on type: /itunes open
To play/pause a song type: /itunes play
To play the next track type: /itunes next
To go back to the previous track type: /itunes previous
To stop a song type: /itunes stop
For track info type: /track 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 No track to play, Itunes may not be open.
}
}
if ($1 == Next) {
.set %next $com(itunes,NextTrack,3)
/track
if (!%next) {
.echo -a No track to play, Itunes may not be open.
}
}
if ($1 == Previous) {
.set %Previous $com(itunes,PreviousTrack,3)
/track
if (!%Previous) {
.echo -a No track to play, Itunes may not be open.
}
}
if ($1 == Stop) {
.set %stop $com(itunes,Stop,3)
if (!%stop) {
.echo -a No track to play, Itunes may not be open.
}
}
}
alias track {
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,Time,3)
.set %time $com(CurrentTrack).result
.echo -q $com(CurrentTrack,Rating,3)
.set %rating $com(CurrentTrack).result
.echo -q $com(CurrentTrack,Name,3)
.set %name $com(CurrentTrack).result
/msg # 4Artist: 12 %artist 4Track: 12 %name 4Album: 12 %album 4Time: 12 %time 4Rating: 12 %rating $+ .
}

Comments

Sign in to comment.
zland   -  Dec 15, 2012
Has this script become broken again? Since iTunes 11, I havent been able to use it and iTunes is open.. this shows up:

* No such Com 'CurrentTrack' open (line 40, itunes 2.mrc)
 Respond  
ZachACook   -  Jun 05, 2011
could you add or tell me how to add the song position (time wise)
 Respond  
troll   -  Apr 20, 2011
thanks. edited a bit but its fine thans
 Respond  
KilllerX   -  Jan 08, 2011
I do video casts sometimes and you always get those people that hear a song. and "What song is that" I want it so I can just type !song and get the info.

And Thank you... Finally works.
 Respond  
sunslayer   -  Jan 08, 2011
i hadn't really payed attention to the actual code i just edited KillerX's version, but thanks
 Respond  
Jethro   -  Jan 08, 2011
sunslayer, when I first used the $strip() in the match text section of an event like that, I was corrected by jaytea to use:

Code

 
But this setup is still considered impractical and he's gonna include the reason why in his upcoming tutorial when it's ready.
 Respond  
sunslayer   -  Jan 08, 2011

Code

 
i still don't see the purpose in puttin this on a bot
 Respond  
KilllerX   -  Jan 08, 2011
Still This Snippet can be used on a Bot. can it not. I uploaded the code to my mIRC bot. and doing the

/itunes open
/itunes next
/itunes previous
/itunes stop
/track

All did what the coding tells it to do. All I want is for it to do a code to make the mirc do /track when I type it from another name.
 Respond  
sunslayer   -  Jan 08, 2011
this snippet isn't intended to be used for a bot.
 Respond  
KilllerX   -  Jan 08, 2011
Still can't figure it out....

I have tried

Code

 


Code

 


neither of these worked.

So again Help would be nice!

(oh don't necessarily ask why that is exactly how I had it. I copied from something old I had and re-modified)
 Respond  
KilllerX   -  Jan 04, 2011
*knows there is a way to make a script to make it so that I don't have to do this though mIRC each time.*

I want to be able to just type !track or !song or something along those lines. and it display this.

I thought it was along the lines of

Code

 


But I can't get it to work. Maybe I am missing some other coding. Any information will be helpful.
 Respond  
CanadaKaos   -  Feb 18, 2010
is there any way to get this to auto announce as itunes changes the song
 Respond  
bybib   -  Feb 12, 2010
I noticed since adding this script my status gets spammed with GETINFO Unknown command
is that due to the script itself or something else? I can't figure out why it would do that all i know is that as i have the script active i get repeats of that in my status.
 Respond  
Master-Of-Death   -  Dec 16, 2009
umm yes uses $com objects, you can make it open itunes though hence the /itunes open, you could use %blah = blah but i prefer being direct with my scripts.
 Respond  
Silo   -  Dec 15, 2009
Interesting So it just uses $com objects to access itunes if it's open? Is there a tutorial for that kind of thing?

PS - Do you really need to use set %var? couldn't var = %time etc work just as well?
 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.