我正在尝试使用 Applescript 移动文件,每次运行应用程序时都会出错。在应用程序的内容中,我有要移动的文件(因此,如果我分发应用程序,用户将不必单独下载文件)。这也是我使用((path to home folder as text)
并添加特定文件路径的原因。这是我的代码:
set source to ((path to home folder as text) & "/Contents/Resources/finder.jpg")
set source2 to ((path to home folder as text) & "/Contents/Resources/finder@2x.jpg")
set destination to alias "Macintosh HD:System:Library:CoreServices:Dock.app:Contents:Resources:"
tell application "Finder"
move source to destination with replacing
move source2 to destination with replacing
end tell
ps 我几乎检查了这里的所有相关问题/答案,但没有任何帮助。