(* Start Script *)
property twittername : "TweetMymacID"
property twitterpassword : "mypas<%&*8#JG'"

tell application "iTunes"
     if player state is not playing then
         set tweet to "iTunes is not playing. Send 'itunes play' to  
start music"
     else
        set thisTrack to current track
        set trackName to thisTrack's name
        set trackArtist to thisTrack's artist
         set tweet to "Playing:" & trackName & " by " & trackArtist
     end if
end tell

set curlIt to "curl -u \"" & twittername & ":" & twitterpassword & "\""

set results to do shell script curlIt & " --data-urlencode \"status="  
& tweet & "\"http://twitter.com/statuses/update.json"; --single line
(*End*)

save this as an Application (I named it TweetTunes) and setup  
TweetMyMac  <http://themacbox.co.uk/tweetmymac/>

Then send 'open TweetTunes' to your Mac from twitter, and it posts the  
name of the currently playing song.

(note, itunes play is a shell script that I have, available at 
http://home.kreme.com/itunes.txt 
)



-- 
"Yessir, Captain Tight Pants."

_______________________________________________
OSX-Nutters mailing list | [email protected]
http://lists.tit-wank.com/mailman/listinfo/osx-nutters
List hosted at http://cat5.org/

Reply via email to