Skip to content

Instantly share code, notes, and snippets.

@jonnypetraglia
Created May 2, 2023 16:17
Show Gist options
  • Save jonnypetraglia/8dbdfa7a6b92a12e252b1c799d3daa55 to your computer and use it in GitHub Desktop.
Save jonnypetraglia/8dbdfa7a6b92a12e252b1c799d3daa55 to your computer and use it in GitHub Desktop.
Wallpaper Setter
LinkFile=%A_Startup%\SetWallpaper.lnk
IfNotExist, %LinkFile%
FileCreateShortcut, %A_ScriptFullPath%, %LinkFile%
if FileExist("C:\Users\%A_Username%\wallpaper.png")
backgroundFile = C:\Users\%A_Username%\wallpaper.png
else
backgroundFile = C:\Users\%A_Username%\wallpaper.jpg
DllCall("SystemParametersInfo", UInt, 0x14, UInt, 0, Str, Trim(backgroundFile), UInt, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment