In article <ma*********************************@python.org> , ryan
<URL:mailto:to********@sbcglobal.net> wrote:
the win32 python extentions don't seem to have "SysParametersInfo()" and i need it to
set the wallpaper in windows.
cyptes has a "SysParametersInfoA()" function but wont let me use the SPI_SETDESKWALLPA
PER attribute.
anyone have any ideas how i can set the windows wallpaper from a python program?
This is what I've been using with windll:
def set_wallpaper(wallpaper):
# refresh wallpaper
try:
import windll
g = windll.module("user32")
buf = windll.cstring(wallpaper)
g.SystemParametersInfo(20, 0, buf, 3)
except:
pass
Regards,
Dietmar