Guest User

Untitled

a guest
Apr 27th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. require 'win32ole'
  2. itunes = WIN32OLE.new('iTunes.Application')
  3. library = itunes.LibraryPlaylist
  4. tracks = library.Tracks
  5. tracks.each {|song| puts "%s by %s (%d)" % [song.Name, song.Artist, song.PlayedCount] if song.PlayedCount > 20}
  6. sleep 0.5
Add Comment
Please, Sign In to add comment