I have been recently using this code to change my windows desktop wallpaper:
import win32api, win32con, win32gui
def setWallpaper(path):
key = win32api.RegOpenKeyEx(win32con.HKEY_CURRENT_USER,
"Control Panel\\Desktop",
0,win32con.KEY_SET_VALUE)
win32api.RegSetValueEx(key, "WallpaperStyle", 0, win32con.REG_SZ, "0")
win32api.RegSetValueEx(key, "TileWallpaper", 0, win32con.REG_SZ, "0")
win32gui.SystemParametersInfo(win32con.SPI_SETDESKWALLPAPER, path, 1+2)
path = r'mypath\image.jpg'
setWallpaper(path)
Is there a way in Python to change a certain monitor wallpaper? Because I have a dual monitor setup and like to have a different image on each screen, I did a bit of searching but couldn't find anything. I am using python 3.4.4 on windows 10.
EDIT: Ideally I would like to not have to join the images together as I have this code running in another program which runs like a random slideshow and by doing the joining images then I would have to join the images in every possible combination.