Sign in to follow this  
Followers 0

Change Wallpaper with AutoIt

1 post in this topic

Posted (edited)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;It work only for *.bmp;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$wallpaper = FileOpenDialog("", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "Bitmap(*.bmp)", 1)
_WallpaperChange($wallpaper)
Func _WallpaperChange($image)
 ;Desktop Position: Stretch
 RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", 2)
 RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", 0)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;
 $spi_setdeskwallpaper = 20
 $spif_updateinifile = 1
 $spif_sendchange = 2
 DllCall("user32.dll", "int", "SystemParametersInfo", _
   "int", $spi_setdeskwallpaper, _
   "int", 0, _
   "str", $image, _
   "int", BitOR($spif_updateinifile, $spif_sendchange))
EndFunc   ;==>_WallpaperChange

Edited by psandu.ro

Share this post


Link to post
Share on other sites



Sign in to follow this  
Followers 0