Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- get current time
- set h to hours of (current date)
- set m to minutes of (current date)
- tell application "Finder"
- set current_path to (container of (path to me) as text)
- end tell
- -- set default periodOfDay
- set imageNumber to (round ((h + (m / 60)) * 16.0 / 24.0) rounding down) + 1
- tell application "System Events"
- -- wrapped in a try block for error suppression
- try
- set desktopCount to count of desktops
- repeat with desktopNumber from 1 to desktopCount
- tell desktop desktopNumber
- set picture to current_path & "mojave_dynamic_" & (imageNumber as string) & ".jpeg"
- end tell
- end repeat
- end try
- end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement