Mountain Lion needs the Tiger modification to the script in order to work. I verified this on my white Macbook4,1 running 10.8.5. Save it as an application that doesn't close using the script editor per @jbarley and you're golden.
Code:
-------------------------------
on idle
(*Get current time in hours.*)
set h to hours of (current date)
(*Set the wallpaper number based on the time of day.*)
set wallpaper to "13"
if (h ≥ 8 and h < 12) then
set wallpaper to "3"
else if (h ≥ 12 and h < 15) then
set wallpaper to "8"
else if (h ≥ 15 and h < 18) then
set wallpaper to "9"
else if (h ≥ 18 and h < 21) then
set wallpaper to "11"
else if (h ≥ 21 and h < 8) then
set wallpaper to "13"
end if
(* Change the wallpaper here. Change the file path to another directory if you have different folders. *)
tell application "Finder"
set desktop picture to {"HDD:Users:username:Pictures:mojave_dynamic:mojave_dynamic_" & wallpaper & ".jpeg"} as alias
end tell
return 900
end idle
end idle
Last edited: