Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 8, 2008, 07:29 PM   #1
Loco.Dice
macrumors newbie
 
Join Date: Mar 2008
iTunes now playing script (irssi/screen/ssh)

Hi!

I have been searching the net for some nice scripts to display the current iTunes song in irssi. They all work fine but only when you run irssi locally.

In my case, irssi is running in a screen on a remote box. I am using it over ssh in the Terminal.

Is there a way to make some kind of applescript that will just paste the current iTunes track in the Terminal window?

Maybe some example script we can tweak for the output?
Loco.Dice is offline   0 Reply With Quote
Old Mar 15, 2008, 04:53 AM   #2
Loco.Dice
Thread Starter
macrumors newbie
 
Join Date: Mar 2008
Trying the best I can, still did not figure this out. Anyone who can help me?
Loco.Dice is offline   0 Reply With Quote
Old Sep 27, 2008, 01:53 PM   #3
krunk
macrumors regular
 
Join Date: Jan 2004
Here's a bash script for cli itunes control:
http://www.nada.kth.se/~larsc/work/C...343/index.html

The snippet of applescript to get the currently playing data:

Quote:
artist=`osascript -e 'tell application "iTunes" to artist of current track as string'`;
track=`osascript -e 'tell application "iTunes" to name of current track as string'`;
album=`osascript -e 'tell application "iTunes" to album of current track as string'`;
echo "$artist: $track [$album]";
I made this into a zsh function

function iStatus() {
artist=`osascript -e 'tell application "iTunes" to artist of current track as string'`;
track=`osascript -e 'tell application "iTunes" to name of current track as string'`;
album=`osascript -e 'tell application "iTunes" to album of current track as string'`;
echo "$artist: $track [$album]";
}

To make an irssi script write a perl script that does the same for you using the IRSSI module or put it in a script and call it with /exec.
__________________
driving english grammar nazis mad since the cold war
krunk is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Quicktime X not playing Purchased .m4v files Princess Cake iPod 1 Jun 28, 2012 04:26 PM
My Itunes won't play the video, only the videos audio?? black screen?? cootersgarage6 OS X 3 Jan 22, 2011 11:24 AM
iTunes now playing list (like WinAmp) fredsherbet Mac Applications and Mac App Store 10 Nov 10, 2010 09:43 AM
Custom iTunes Now Playing Screen vince.nl Mac Applications and Mac App Store 0 Apr 5, 2007 04:04 AM
Using Nicecast.. posting iTunes now playing online? Fourbin Mac Applications and Mac App Store 0 Apr 9, 2005 12:20 PM


All times are GMT -5. The time now is 05:59 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC