El siguiente es un inicio, hasta que averiguar cómo leer el escritorio contar en el Control de la Misión. Ahora para que esto funcione, debe estar en el más lejano a la izquierda del Escritorio.
De no saber a donde tu pic está situado estoy apuntando a una imagen en Desktop Pictures
con:
set thePic to file ((path to library folder from local domain as text) & "Desktop Pictures:Blue Pond.jpg") as text
Me puse una variable para el recuento de Control de la Misión Escritorios:
set windowCount to 5
Voy a construir una repetición de un bucle de inicio con el primer número hasta que se llegue a la cuenta:
repeat with X from 1 to windowCount
end repeat
Yo uso el código de tecla para mover a la derecha con control
sólo cuando el recuento es mayor que 1 y un retraso:
repeat with X from 1 to windowCount
tell application "Finder"
tell application "System Events"
if X > 1 then
key code 124 using control down ## move right
delay 1
end if
end tell
end tell
end repeat
Yo entonces de referencia de cada Escritorio y añadir un retardo en la imagen para que se establezca:
tell application "System Events"
set deskGroup to (a reference to every desktop)
repeat with theDesk in deskGroup
set picture of theDesk to thePic
end repeat
end tell
delay 1
el código completo:
set thePic to file ((path to library folder from local domain as text) & "Desktop Pictures:Blue Pond.jpg") as text
set windowCount to 5
repeat with X from 1 to windowCount
tell application "Finder"
tell application "System Events"
if X > 1 then
key code 124 using control down ## move right
delay 1
end if
set deskGroup to (a reference to every desktop)
repeat with theDesk in deskGroup
set picture of theDesk to thePic
end repeat
end tell
delay 1
end tell
end repeat
esta es una manera de hacer esto espero que ayude. Esto funciona y fue probada usando macOS Alta Sierra 10.13.6