Do you need to change desktop wallpaper every 3 seconds, just to show off.
import ctypes, time, os
SPI_SETDESKWALLPAPER = 20
path = "C:\\Users\\Ajju\\Desktop\sdfawef\\test_images"
for filename in os.listdir(path):
print filename
ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0 , path + '\\' + filename, 0)
time.sleep(3)
=============================================================
Notes:
1. This will change desktop wallpaper using all the files in the folder defined in path variable.
2. This will not repeat files.
import ctypes, time, os
SPI_SETDESKWALLPAPER = 20
path = "C:\\Users\\Ajju\\Desktop\sdfawef\\test_images"
for filename in os.listdir(path):
print filename
ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0 , path + '\\' + filename, 0)
time.sleep(3)
=============================================================
Notes:
1. This will change desktop wallpaper using all the files in the folder defined in path variable.
2. This will not repeat files.
Comments
Post a Comment