0
我目前使用applescript在我的大學設置桌面的各種參數。到目前爲止,我的腳本已成功更改桌面背景和底座大小。使用Applescript更改桌面圖標大小
手頭的問題是當我運行腳本時,大部分時間,桌面上的圖標都不會改變。
這裏是我寫的改變桌面圖標的大小和網格間距腳本:
tell application "System Events"
set finderPrefsFile to property list file "~/Library/Preferences/com.apple.Finder.plist"
tell finderPrefsFile
tell property list item "DesktopViewSettings"
tell property list item "IconViewSettings"
set value of property list item "gridSpacing" to "100"
set value of property list item "iconSize" to "32"
set value of property list item "arrangeBy" to "none"
end tell
end tell
end tell
end tell
#Restart Finder for changes to take effect.
do shell script "killall Finder"
我應該如何去改變腳本,使其工作所有的時間(我想最終共享此腳本與我的一些同學)。
謝謝@ShooTerKo。我想知道爲什麼直接編輯首選項文件是不可靠的,它在碼頭大小的100%的時間內工作。這絕對讓我更接近我的目標。感謝您的幫助伴侶。乾杯! – 2014-12-03 22:34:36