|
I found a really handy vbs script for song information, I've changed it a little myself, (don't know how to upload here)
it gets song name, artist, and track time and prints to a .txt file, then you can use rainmeter to read the file and print information (checking every 1-5 seconds)
I found the script here: http://www.obfuscatepenguin.net/code/2009/03/27/rainmeter-it unes/
and there is more information about song info here: http://www.microsoft.com/technet/scriptcenter/funzone/tunes. mspx
I think it is causing crashed of rainmeter at the moment, i;m not sure.
I'm trying to figure out how to get a progress bar, using a timer and the track time, then using the bar meter.
I know this isn't control of itunes, but it's a start.
--script--
' ==== USER-DEFINABLE PARAMETERS =======================================
FILENAME = "C:\Users\Luke\Links\rainmeter_itunes_playing.txt" SECONDS_BETWEEN_CHECKS = 1
' ======================================= USER-DEFINABLE PARAMETERS ====
Function UpdateInfo() Set Current = iTunes.CurrentTrack
Name = Current.Name Artist = Current.Artist Length = Current.Time
Set f1 = fso.CreateTextFile(FILENAME) f1.Write Name + vbCrLf + Artist + vbCrLf + Length f1.Close End Function
Function ClearInfo() Set f1 = fso.CreateTextFile(FILENAME) f1.Write vbCrLf f1.Close End Function
Set fso = CreateObject("Scripting.FileSystemObject")
iTunesRunning = 0
delay = SECONDS_BETWEEN_CHECKS * 1000
Do Do ClearInfo() Wscript.Sleep(delay)
Set colProcesses = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQ uery( "Select * From Win32_Process", , 48 ) For Each objProcess in colProcesses If LCase(objProcess.Name) = "itunes.exe" Then iTunesRunning = 1 Next Loop While iTunesRunning = 0
Set iTunes = CreateObject("iTunes.Application")
Do PlayState = iTunes.PlayerState If PlayState Then UpdateInfo() Else ClearInfo() End If
Wscript.Sleep(delay) iTunesRunning = 0 Set colProcesses = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQ uery( "Select * From Win32_Process", , 48 ) For Each objProcess in colProcesses If LCase(objProcess.Name) = "itunes.exe" Then iTunesRunning = 1 Next Loop While iTunesRunning = 1 Set iTunes = Nothing Loop
--end script--
(cut down the comments at the top)
06:16 pm (6 months ago)
|