Applescript路径给我返回错误

时间:2014-06-14 03:01:19

标签: macos applescript ui-automation

我有一个带有以下功能的Apple脚本(.scpt):

on scrap_range(min, max)
    repeat with loop from min to max
        tell application "Safari"
            -- Do stuff
        end tell
        tell application "Finder"
            set outputFile to ((container of (path to me)))
        end tell
        display dialog (outputFile as text)
    end repeat
end scrap_range

当我在Applescript编辑器中运行它时失败并显示以下事件日志。

tell current application
    path to current application
Result:
error "File some object wasn’t found." number -43

它突出了代码中的“我的路径”文本。我哪里错了?非常感谢。

0 个答案:

没有答案