![](/img/trans.png)
[英]How to change the wallpaper for all spaces in macOS using Applescript/shell?
[英]Change Mac wallpaper through AppleScript
我正在嘗試指定一個jpg文件作為特定桌面的牆紙,但它似乎不起作用...而是將背景更改為完全不同的文件夾中的另一張圖片 ...任何人都知道如何修復它?
tell application "System Events"
tell current desktop
set picture to "/Downloads/yosemite-5796x3531-5k-4k-wallpaper-el-capitan-forest-osx-apple-3962.jpg"
end tell
結束告訴
您作為參數傳遞的路徑不正確。 硬盤的根級別上沒有/Downloads
文件夾。 您可能的意思是:
"/Users/yourusernamehere/Downloads/example.jpg"
在高山脈上測試,將路徑替換為您喜歡的任何路徑
tell application "System Events" to set picture of (reference to current desktop) to "/Library/Desktop Pictures/Sierra 2.jpg"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.