我在寫一篇AppleScript的拍照我選擇放它在/System/Library/PrivateFrameworks/LoginUIKit.framework/Versions/A/Frameworks/LoginUICore.framework/Resources
,但每當我運行它得來的錯誤的腳本,說錯誤複製用戶所選擇的照片使用AppleScript
「340:354:執行錯誤:Finder出現錯誤:無法設置文件(別名「Macintosh HD:用戶:Samuel:圖片:4.jpg」)文件夾「Macintosh HD:System:Library:PrivateFrameworks:LoginUIKit.framework:Versions:A:框架:LoginUICore.framework:資源 「(-10006)(1)。」
osascript -e 'set this_file to choose file
display dialog "Login Walls is now going to attempt to change the wallpaper." buttons {"Okay"} default button "Okay"
tell application "Finder"
set apple to "apple.png"
copy folder "Macintosh HD:System:Library:PrivateFrameworks:LoginUIKit.framework:Versions:A:Frameworks:LoginUICore.framework:Resources" to file this_file
end tell'
上面的代碼片斷是從是從與管理員權限的小程序腳本調用.SH。
我真正需要做的是如果可以告訴我該怎麼做,該文件將被複制和重命名。