It appears I'm looking at this problem wrong, but…
I'm trying to cook up a simple little AS app that I might be able to make into a right click service on the desktop to that I can have the desktop randomly pick another photo from the desktops folder.
The issue is that I often have more than one desktop and though we can do this:
tell application "System Events"
tell current desktop
end tell
end tell
I was expecting that somewhere there was a list of all desktops such as "desktops" or "the desktops" or "desktops list" or "list of desktops".
Somehow, I thought this would be tracked and exposed, but I can't find it.
What does work though is "set x to every desktop" but this doesn't work if I try to message the desktop by that ID like so:
repeat with myDesktopID in myDesktops
tell myDesktopID
set initInterval to get change interval -- get the current display interval
This is what ends up happening:
tell application "System Events"
get every desktop
--> {desktop "69677952", desktop "69503829"}
get change interval of desktop "69677952"
--> error number -10002 from «class dskp» "69677952"
error "System Events got an error: Invalid key form." number -10002 from desktop "69677952"
What's the proper method to getting the list of desktops and walking it?
TY.