DIY animated desktop

Tech B 0 Tallied Votes 924 Views Share

Thought someone might like this little script. Its an animated wallpaper.
You'll need to draw the frames though. I used Windows paint to make the frames. I drew two stick people fighting. You'll need to know the basics about animation. I saved each picture as .bmp It worked with .jpg but had a little lag.

The original background will appear upon logging off or shutting down. To avoid this you'll need to use ActiveDesktop extensions. Or put this script in the startup folder.

It can be used as a slide show too, by changing the time.sleep()


Any questions feel free to reply.

import ctypes, time

p = 'Path\\to\\picture\\folder'

pic = 1

while 1:

  time.sleep(.05)
  SPI_SETDESKWALLPAPER = 20
  ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, "C:\\Users\\owner\\Desktop\\techWall\\"+str(pic)+".jpg", 0)
  if pic == 21: # number of pictures in folder
    time.sleep(5)
    pic = 1
    continue
  pic += 1