Skip to content

Instantly share code, notes, and snippets.

@relrod
Created June 1, 2009 00:09
Show Gist options
  • Save relrod/121093 to your computer and use it in GitHub Desktop.
Save relrod/121093 to your computer and use it in GitHub Desktop.
require 'win32ole'
iTunes = WIN32OLE.new("iTunes.Application")
currentsong = iTunes.CurrentTrack
name = currentsong.name
artist = currentsong.artist
if name != nil then
puts "#{1.chr}ACTION is currently listening to: #{name} by #{artist}.#{1.chr}"
else
puts "#{1.chr}ACTION isn't listening to anything atm.#{1.chr}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment