osascript per impostare lo sfondo del desktop secondario?

5

Ho usato questo:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST
1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd>
<plist version="1.0">
<dict>
 <key>Label</key>
  <string>com.filmscoring.display.plist</string>
 <key>ProgramArguments</key>
  <array>
    <string>osascript</string>
    <string>-e</string>
    <string>tell application "Finder"
set f to POSIX file "/Library/Desktop Pictures/mac cinema desktop yoda.png"
if desktop picture is not file f then set desktop picture to f
end tell</string>
  </array>
 <key>StartInterval</key>
  <integer>10</integer>
</dict>
</plist>

Per impedire agli utenti di cambiare il desktop. (E lo adoro btw!) L'originale può essere trovato qui: Come limitare il cambiamento sfondo del desktop?

Tutte le nostre stazioni hanno una schermata secondaria che mi piacerebbe anche sistemare allo stesso modo usando un'immagine diversa.

Qualche idea su come posso indirizzare lo schermo secondario con questo codice? Grazie per l'aiuto!

    
posta c o r y 06.12.2013 - 01:01
fonte

1 risposta

2

La ricerca rapida di Google ha rivelato il seguente codice:

set tlst to {}
--set newtop to (path to home folder as string) & "Pictures:desktop pics folder:BigDipper 916.jpg" as alias -- sample line
set newtop to choose file


tell application "System Events"
   set tlst to a reference to every desktop
   --set picture of item 1 of tlst to newtop -- display 1
   set picture of item 2 of tlst to newtop -- display 2
end tell

Tratto da

link

Non ho un secondo monitor, quindi non posso testarlo.

Spero che ti aiuti.

    
risposta data 20.03.2014 - 19:45
fonte

Leggi altre domande sui tag