Created
June 1, 2009 00:09
-
-
Save relrod/121093 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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