我想在外部应用程序(例如MacVim)的当前选项卡中打开文档。根据StackOverflow answer我创建了一个Automator的服务,下面的AppleScript代码:XCode 5 - AppleScript - 如何在当前选项卡中获取文档
tell application "Xcode"
set current_document to last source document
set current_document_path to path of current_document
end tell
tell application "MacVim"
activate
open current_document_path
end tell
的问题是,它从第一选项卡中打开该文件,而不是从当前选项卡。我怎样才能获得当前标签的路径?