Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;$filePath = "C:\Users\USERNAME\AppData\Roaming\Microsoft\Internet Explorer\rainbow_dash.bmp"
- $filePath = EnvGet("UserProfile") & "\Desktop\lossless_wallpaper.bmp"
- ; This works just fine. Idk, wanted to try something different
- ; Derived from _ChangeWallpaper function by TheOnlyOne http://www.autoitscript.com/forum/user/41709-theonlyone
- ;DllCall("User32.dll","int","SystemParametersInfo","int",20,"int",0,"str", $filePath ,"int",0)
- ; this one is from: https://social.msdn.microsoft.com/Forums/windows/en-US/234e2c53-3233-46e9-b81a-856fb6cb1d61/getset-desktop-wallpaper-in-windows-7?forum=winforms
- local $SPI_SETDESKWALLPAPER = 0x14
- local $SPIF_UPDATEINIFILE = 0x01
- local $SPIF_SENDWININICHANGE = 0x2
- DllCall("User32.dll","int","SystemParametersInfo","int",0x14, "int", 0x3, "str", $filePath, "int", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDWININICHANGE))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement