Advertisement
Steo94

Untitled

Mar 30th, 2023 (edited)
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. # Import des modules nécessaires
  2. import os
  3. import ctypes
  4. from PIL import Image
  5.  
  6. # Définition des variables
  7. wallpaperURL = "https://ds.static.rtbf.be/article/image/1920x1080/4/4/9/a95b7d8a3961c97a1353f0d2311c1ad4-1460466396.jpg"
  8. wallpaper = Image.open(wallpaperURL) # Chemin de l'image de fond d'écran
  9.  
  10. # Fonction qui modifie le fond d'écran
  11. def change_wallpaper(wallpaper):
  12. ctypes.windll.user32.SystemParametersInfoW(20, 0, wallpaper, 0)
  13.  
  14. # Appel de la fonction qui modifie le fond d'écran
  15. change_wallpaper(wallpaper)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement