Wallpaper Changer

This simple button changes the wallpaper randomly selecting from a list of image files (stored in a text file). You can change the wallpaper manually by clicking on this button, and you can add the path to Change Wallpaper.dcf into the program scheduler to automatically change the pictures.

Instead /myarchive\Programs\Wallpapers\List.txt, specify the path to your file list.
File list format: each full path to the picture, together with the extension on a separate line.



Button download:

Script Code:

This is contained in the download above, and reproduced here for reference.

Option Explicit

Function OnClick(ByRef ClickData)
   Dim File, FSO, ImageFile, ImageList
   File = DOpus.FSUtil.Resolve("/myarchive\Programs\Wallpapers\List.txt")
   If DOpus.FSUtil.Exists(File) Then
      Set FSO = CreateObject("Scripting.FileSystemObject")
      ImageList = Split(FSO.OpenTextFile(File, 1).ReadAll, vbCrLf)
      ImageFile = ImageList(CInt(Int((UBound(ImageList) + 1) * Rnd())))
      If DOpus.FSUtil.Exists(ImageFile) Then
         ClickData.Func.Command.RunCommand("Properties SETWALLPAPER=stretch """ & ImageFile & """")
         DOpus.output("File is not found: " & ImageFile)
      End If
   End If
End Function


Very good, I love it.