AHK Wallpaper Change doesn't persist
Posted: 30 Dec 2023, 15:37
So I have a snippet of code that works as expected - successfully changes the wallpaper on the desktop using:
Strange thing I've noticed on my Windows 11 desktop, is that if I switch to another virtual desktop (via task view for example) and come back to the first virtual desktop, the changed wallpaper is gone. Replaced instead by whatever I had on there before the AHK script changed it. For further context - I have 2 different virtual desktops, each of which was assigned a different wallpaper (to distinguish the desktops easily) via the Setting>Personalization>Background menu in Windows 11.
To reiterate, the script succeeds in changing the wallpaper, except that the change doesn't persist if I switch away and then back to the said virtual desktop. Any ideas how I might be able to make the change persist?
AHK Version 1.1 // Windows 11 // Nvidia drivers and Windows up-to-date
Code: Select all
; Update system wallpaper
SysParamInfoResult := DllCall("SystemParametersInfo", UInt, 0x14, UInt, 0, Str, wallpath, UInt, 1)
To reiterate, the script succeeds in changing the wallpaper, except that the change doesn't persist if I switch away and then back to the said virtual desktop. Any ideas how I might be able to make the change persist?
AHK Version 1.1 // Windows 11 // Nvidia drivers and Windows up-to-date