It does require the IrfanView graphics program to convert the cover graphic to a BMP file. http://www.irfanview.com (When the updated script doco comes out for MM 2.5, the ImageConvert function may eliminate the need for an external jpg-->BMP step)
Add this to your scripts.ini:
Code: Select all
[ShowCover]
FileName=ShowCover.vbs
ProcName=ShowCover
Order=1
DisplayName=&ShowCover
Description=ShowCover
Language=VBScript
ScriptType=2
Code: Select all
Sub ShowCover
Set fso = SDB.Tools.FileSystem
Set itm = SDB.Player.CurrentSong
Set AlbumArt = itm.AlbumArt
if (AlbumArt.count > 0) Then
Set Image = AlbumArt.Item(0).Image
fname = "Cover.jpg"
Set falbum = fso.CreateTextFile( "C:\tmp\Cover.jpg", True)
falbum.WriteData Image.ImageData, Image.ImageDataLen
falbum.close
' Prepare WScript.Shell object, which can be used for execution of applications
Set WShell = CreateObject("WScript.Shell")
' This WShell.Run is one long line, do not LINE WRAP
WShell.Run "c:\bin\irfanview\i_view32.exe c:\tmp\Cover.jpg /silent /convert=c:\tmp\Cover.bmp", 7, 1
WShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", "c:\tmp\Cover.bmp"
WShell.RegWrite "HKCU\Control Panel\Desktop\TileWallpaper","1"
WShell.run "rundll32.exe user32.dll,UpdatePerUserSystemParameters 1,True"
end if
end sub