【发布时间】:2012-03-01 12:25:31
【问题描述】:
我正在尝试在 Omnigraffle Professional 5 中获取不带当前文档文件扩展名的文件名。
tell application "OmniGraffle Professional 5"
set _document to front document
set _path to path of _document
-- Get filename without extension
tell application "Finder"
set {_filename, _extension, _ishidden} to the
{displayed_name, name_extension, extension_hidden} of the _path
end tell
end tell
这给了我以下错误:error "Can’t get displayed_name of \"/Users/ca/Downloads/Feb 8.graffle\"." number -1728 from displayed_name of "/Users/ca/Downloads/Feb 8.graffle"。
我找到了一些相关的问题和页面,但我有点迷茫,真的不明白为什么它不起作用。
感谢您的帮助!
【问题讨论】:
标签: macos path applescript