我有一个正在我的计算机上运行的Applescript,但不在我的同事身上.操作路径时出现两个错误:-10004和-10000.我知道如何解决这个问题,但首先我想了解这些错误代码.
这是脚本(我删除了无用的部分,完整版本在github上):
-- export all layers to image files
-- Settings
property exportFileExtension : "png"
property ADD_CANVAS_NUMBER : true
-- End of Settings
on file_exists(FileOrFolderToCheckString)
try
alias FileOrFolderToCheckString
return true
on error
return false
end try
end file_exists
tell application "OmniGraffle Professional 5"
set theWindow to front window
set theDocument to document of theWindow
set theFilename to name of theDocument
-- remove .graffle
-- FIRST ERROR IS HERE -10004
set theFilename to …Run Code Online (Sandbox Code Playgroud)