Microsoft Small Basic

Program Listing: TLQ850
TextWindow.Title = "Wallpaper Shufflr"
StoreIMGS()
Sub StoreIMGS
GraphicsWindow.Hide()
num_img = Dialogs.AskForTextLine("How many images would you like to use?")
For i = 1 To num_img
imgs[i] = Dialogs.AskForFile()
TextWindow.WriteLine("Image " + i + ": " + imgs[i] + ".")
TextWindow.WriteLine("Images stored: " + Array.GetItemCount(imgs))
EndFor
EndSub
int = Dialogs.AskForTextLine("How often would you like to change your wallpaper?")
int = int * 60000
Shufflr()
Timer.Interval = int
Timer.Tick = Shufflr
Timer.Resume()
Sub Shufflr
Desktop.SetWallPaper(imgs[Math.GetRandomNumber(Array.GetItemCount(imgs)-1)])
EndSub