我在写一篇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。
我真正需要做的是如果可以告诉我该怎么做,该文件将被复制和重命名。