Here are the instructions for enabling the current song to display as your desktop wallpaper.
-------------------------------------------------------
Install python 2.4.1 (or greater) from
http://python.org/.
Install ImageMagick from
http://imagemagick.org I installed this one:
http://www.imagemagick.org/download/bin ... ws-dll.exe
Cut out and save the various scripts below as described.
You will end up with one directory like this
In c:\a\covers (any directory, recommend NO spaces in path name)
ShowCover.bat
ShowCover.py
cover.jpg (will be created, this is the extracted art)
cover.bmp (will be created, bmp for wallpaper)
Put ShowCover.vbs into the MediaMonkey script dir
Update your script.ini file.
Since the ShowCovers.vbs is setup in scripts.ini (ScriptType=2)
to fire when a song starts, once everything is in place
you should see the album covers show as your wallpaper.
No error checking is done, the last wallpaper shown
stays as your wallpaper when you leave MM, songs with no
image tags will not change anything, only the first image
contained in the MP3 file is used. Yes, I tried to remove
the hardcoded paths but it was a pain and went back
to hardcoding for now.
-----------------------------------------------------
-- ShowCover.vbs
-- Save this as the file 'ShowCover.vbs'
-- and place it in the MediaMonkey scripts directory.
-----------------------------------------------------
----CUT-----CUT-----CUT---------------------------------
' Change to the location where the scripts are
Const PgmPath = "C:\a\covers\ShowCover.bat"
Sub ShowCover
' Define variables
Dim X, WShell, Command, list, itm, WSHShell, N, RegLoc
' Get current track from MediaMonkey
Set itm = SDB.Player.CurrentSong
' Prepare WScript.Shell object
Set WShell = CreateObject("WScript.Shell")
' Prepare command to execute
Command = Chr(34) & PgmPath & Chr(34) & " " & Chr(34) & itm.Path & Chr(34)
' Run bat file, using mode 7 (minimized window)
WShell.Run Command, 7, 1
' The bat file just run created the Cover.bmp wallpaper file
' Tell the registry where the wallpaper image is and force an update.
' Change the bmp location below as needed.
WShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", "c:\a\covers\Cover.bmp"
WShell.RegWrite "HKCU\Control Panel\Desktop\TileWallpaper","1"
WShell.run "rundll32.exe user32.dll,UpdatePerUserSystemParameters 1,True"
end sub
----CUT-----CUT-----CUT---------------------------------
-----------------------------------------------------
-- End ShowCover.vbs
-----------------------------------------------------
-----------------------------------------------------
-- scripts.ini parms
-- Add this to your MediaMonkey scripts.ini file
-----------------------------------------------------
----CUT-----CUT-----CUT---------------------------------
[ShowCover]
FileName=ShowCover.vbs
ProcName=ShowCover
Order=1
DisplayName=&ShowCover
Description=ShowCover
Language=VBScript
ScriptType=2
ShowCoverDir=c:\MediaMonkey\Scripts\ShowCover
----CUT-----CUT-----CUT---------------------------------
-----------------------------------------------------
-- End scripts.ini
-----------------------------------------------------
-----------------------------------------------------
-- ShowCover.bat
-- Save this as file 'ShowCover.bat'
-- Place it in a working directoy.
-- The samples below use c:\a\covers - change as desired
-- NOT tested with directoy names containging spaces....
-----------------------------------------------------
----CUT-----CUT-----CUT---------------------------------
REM Change this chdir to point to where your bat file
REM and the python script is.
chdir c:\a\covers
c:\bin\python24\python ShowCover.py %1
c:\bin\ImageMagick\convert.exe Cover.jpg Cover.bmp
----CUT-----CUT-----CUT---------------------------------
-----------------------------------------------------
-- End ShowCover.bat
-----------------------------------------------------
-----------------------------------------------------
-- ShowCover.py
-- Save this as the file 'ShowCover.py'
-- place it in the same directory as the ShowCover.bat file
-- Those are splits look for HEX characters, leave them as-is.
-----------------------------------------------------
----CUT-----CUT-----CUT---------------------------------
import os, sys, re
from stat import *
# Open the MP3 file passed in on the command line
f = open(sys.argv[1], 'rb')
# Open the jpg file to be created
fo = open('Cover.jpg', 'wb')
# Read in the entire MP3 file
x = f.read()
# Remove everything up to the start of the embeded jpg cover art
y = re.split('\xFF\xD8\xFF\xE0\x00\x10\x4A\x46\x49\x46\x00\x01\x01', x, re.M)
# Put the jpg header back on
tmppic = '\xFF\xD8\xFF\xE0\x00\x10\x4A\x46\x49\x46\x00\x01\x01' + y[1]
# Remove everything after the end of the jpg image
z = re.split('\xFF\xD9', tmppic, re.M)
# Put the end-of-jpg string back
pic = z[0] + '\xFF\xD9'
# Write out the jpg image
fo.write(pic)
fo.close
f.close
----CUT-----CUT-----CUT---------------------------------
-----------------------------------------------------
-- End ShowCover.bat
-----------------------------------------------------
Here are the instructions for enabling the current song to display as your desktop wallpaper.
-------------------------------------------------------
Install python 2.4.1 (or greater) from http://python.org/.
Install ImageMagick from http://imagemagick.org I installed this one:
http://www.imagemagick.org/download/binaries/ImageMagick-6.2.3-2-Q16-windows-dll.exe
Cut out and save the various scripts below as described.
You will end up with one directory like this
In c:\a\covers (any directory, recommend NO spaces in path name)
ShowCover.bat
ShowCover.py
cover.jpg (will be created, this is the extracted art)
cover.bmp (will be created, bmp for wallpaper)
Put ShowCover.vbs into the MediaMonkey script dir
Update your script.ini file.
Since the ShowCovers.vbs is setup in scripts.ini (ScriptType=2)
to fire when a song starts, once everything is in place
you should see the album covers show as your wallpaper.
No error checking is done, the last wallpaper shown
stays as your wallpaper when you leave MM, songs with no
image tags will not change anything, only the first image
contained in the MP3 file is used. Yes, I tried to remove
the hardcoded paths but it was a pain and went back
to hardcoding for now.
-----------------------------------------------------
-- ShowCover.vbs
-- Save this as the file 'ShowCover.vbs'
-- and place it in the MediaMonkey scripts directory.
-----------------------------------------------------
----CUT-----CUT-----CUT---------------------------------
' Change to the location where the scripts are
Const PgmPath = "C:\a\covers\ShowCover.bat"
Sub ShowCover
' Define variables
Dim X, WShell, Command, list, itm, WSHShell, N, RegLoc
' Get current track from MediaMonkey
Set itm = SDB.Player.CurrentSong
' Prepare WScript.Shell object
Set WShell = CreateObject("WScript.Shell")
' Prepare command to execute
Command = Chr(34) & PgmPath & Chr(34) & " " & Chr(34) & itm.Path & Chr(34)
' Run bat file, using mode 7 (minimized window)
WShell.Run Command, 7, 1
' The bat file just run created the Cover.bmp wallpaper file
' Tell the registry where the wallpaper image is and force an update.
' Change the bmp location below as needed.
WShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", "c:\a\covers\Cover.bmp"
WShell.RegWrite "HKCU\Control Panel\Desktop\TileWallpaper","1"
WShell.run "rundll32.exe user32.dll,UpdatePerUserSystemParameters 1,True"
end sub
----CUT-----CUT-----CUT---------------------------------
-----------------------------------------------------
-- End ShowCover.vbs
-----------------------------------------------------
-----------------------------------------------------
-- scripts.ini parms
-- Add this to your MediaMonkey scripts.ini file
-----------------------------------------------------
----CUT-----CUT-----CUT---------------------------------
[ShowCover]
FileName=ShowCover.vbs
ProcName=ShowCover
Order=1
DisplayName=&ShowCover
Description=ShowCover
Language=VBScript
ScriptType=2
ShowCoverDir=c:\MediaMonkey\Scripts\ShowCover
----CUT-----CUT-----CUT---------------------------------
-----------------------------------------------------
-- End scripts.ini
-----------------------------------------------------
-----------------------------------------------------
-- ShowCover.bat
-- Save this as file 'ShowCover.bat'
-- Place it in a working directoy.
-- The samples below use c:\a\covers - change as desired
-- NOT tested with directoy names containging spaces....
-----------------------------------------------------
----CUT-----CUT-----CUT---------------------------------
REM Change this chdir to point to where your bat file
REM and the python script is.
chdir c:\a\covers
c:\bin\python24\python ShowCover.py %1
c:\bin\ImageMagick\convert.exe Cover.jpg Cover.bmp
----CUT-----CUT-----CUT---------------------------------
-----------------------------------------------------
-- End ShowCover.bat
-----------------------------------------------------
-----------------------------------------------------
-- ShowCover.py
-- Save this as the file 'ShowCover.py'
-- place it in the same directory as the ShowCover.bat file
-- Those are splits look for HEX characters, leave them as-is.
-----------------------------------------------------
----CUT-----CUT-----CUT---------------------------------
import os, sys, re
from stat import *
# Open the MP3 file passed in on the command line
f = open(sys.argv[1], 'rb')
# Open the jpg file to be created
fo = open('Cover.jpg', 'wb')
# Read in the entire MP3 file
x = f.read()
# Remove everything up to the start of the embeded jpg cover art
y = re.split('\xFF\xD8\xFF\xE0\x00\x10\x4A\x46\x49\x46\x00\x01\x01', x, re.M)
# Put the jpg header back on
tmppic = '\xFF\xD8\xFF\xE0\x00\x10\x4A\x46\x49\x46\x00\x01\x01' + y[1]
# Remove everything after the end of the jpg image
z = re.split('\xFF\xD9', tmppic, re.M)
# Put the end-of-jpg string back
pic = z[0] + '\xFF\xD9'
# Write out the jpg image
fo.write(pic)
fo.close
f.close
----CUT-----CUT-----CUT---------------------------------
-----------------------------------------------------
-- End ShowCover.bat
-----------------------------------------------------