AppleScript在点击Finder中的任何位置时打开**当前**文件夹中的终端?

时间:2016-04-20 10:53:00

标签: macos applescript osx-elcapitan automator finder

当我在Finder中右键单击文件夹时,我已经有了New Terminal at Folder服务。

现在,我还希望能够在Finder窗口中右键单击任何地方(即在文件和文件夹周围的空白处),并可以选择New Terminal here

我现在有以下Automator脚本(Run AppleScriptno input Finder):

tell application "Finder"
    set this_folder to (folder of the front Finder window) as alias
end tell

tell application "Terminal"
    activate
    do script "cd \"" & (POSIX path of (this_folder as string)) & "\""
end tell

当我右键单击一个文件夹时,这是有效的 - 它会在我所站的文件夹中打开一个新的终端窗口(而不是我右键单击的那个)。

现在,是否可以在右键单击空格(或至少在文件和文件夹上)时显示此服务?

修改

我刚发现this app可以放在Finder工具栏中,完全符合我的需要。但是,了解是否可以使用服务仍然很有趣。

0 个答案:

没有答案