Created
January 3, 2024 11:59
-
-
Save yuhonas/2c329f010665885e91ff9ae39a6e8042 to your computer and use it in GitHub Desktop.
Using apple script prompt the user for an image file then set it on every desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application (path to frontmost application as text) | |
try | |
set imageFile to (choose file with prompt "Select an image file:" of type "public.image") as text | |
end try | |
end tell | |
tell application "System Events" | |
repeat with desktopIndex from 1 to count of desktops | |
tell desktop desktopIndex | |
set picture to imageFile | |
end tell | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there way to set that to a folder and enable the rotation every x seconds? I have searched the internet and all the solutions did not work on Sonoma version.