« [SMB]ゲストユーザーに共有フォルダへの接続 | トップページ | [Finder]デスクトップ・ピクチャーを変更する »

[System Events]デスクトップ・ピクチャーを変更する

デュアルモニタも全て変更

tell application "System Events"
tell every desktop
set picture to (POSIX file "/System/Library/Desktop Pictures/Solid Colors/Red Orange.png")
(*
Turquoise Green.png
Ocher.png
Plum.png
Red Orange.png
Rose Gold.png
Silver.png
Soft Pink.png
Dusty Rose.png
Electric Blue.png
Gold 2.png
Gold.png
Blue Violet.png
Black.png
Yellow.png
*)
end tell
end tell



個別に設定する場合
tell application "System Events"
set listDesktop to every desktop
log listDesktop
repeat with objDesktop in listDesktop
set numID to (id of objDesktop) as number
if numID = 1 then
tell objDesktop
set picture to (POSIX file "/System/Library/Desktop Pictures/Solid Colors/Red Orange.png")
log name as text
log display name as text
log id as number
set change interval to 0
set picture rotation to 0
set random order to false
set translucent menu bar to false
set dynamic style to dark
end tell
else
tell objDesktop
set picture to (POSIX file "/System/Library/Desktop Pictures/Solid Colors/Gold 2.png")
log name as text
log display name as text
log id as number
set change interval to 0
set picture rotation to 0
set random order to false
set translucent menu bar to false
set dynamic style to dark
end tell
end if
end repeat
end tell

|

« [SMB]ゲストユーザーに共有フォルダへの接続 | トップページ | [Finder]デスクトップ・ピクチャーを変更する »

AppleScript Desktop」カテゴリの記事