我有一个带有以下功能的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
它突出了代码中的“我的路径”文本。我哪里错了?非常感谢。