Trying to get the following code to change the wallpaper on only the secondary screen, not the primary screen. I have downloaded multiple commercial apps and they change both, so I am trying to write a script that will change only the secondary monitor while not changing the primary one. This script pulls png's from a folder and then changes the wallpaper on a timed interval. I read through the systemparametersinfo on microsofts website but didn't see what I am looking for, help?
Code: Select all
#persistent
arr := [], cnt := 1, mnts := 1
loop, files, C:\Images\*.png
arr.push(A_LoopFileFullPath)
SetTimer, Change, % 1000*60*mnts
change:
DllCall("SystemParametersInfo",UInt,0x0014,UInt,0,Str,arr[cnt],UInt,2)
cnt := cnt = arr.count() ? 1 : ++cnt
return