apple script 可以解决问题

#apple script可以解决 scpt文件, 用苹果工具script editor编辑
tell application "Finder" to make new file at (the target of the front window) as alias
#然后记得保存为app, 如果保存为script, 则无法直接执行.
  • 步骤
    1. 打开apple script 输入上面的脚本
    2. 另存为app ,另存为app
    3. 按住⌘, 把app拖到finder的工具栏
    4. 大功告成, 任何目录都能弄这事了.

open in也可以解决问题

  1. 地址: :
  2. 如何在目录中新建一个文件,
  3. 怎样在进入terminal的时候指定当前目录(虽然可以拖入, 但是还要费一步)
#脚本很令人惊讶, 就一句话. 注意这个是workflow文件. 用automator
while read file; do /usr/local/bin/mate "$file"; done

nufile和document palette

on run {input, parameters}
  tell application "Finder"
    set currentPath to insertion location as text
    set x to POSIX path of currentPath
  end tell
  return x
end run

tell application "Finder"
    insertion location as alias is desktop as alias
    container of item 1 of (get selection) as alias is desktop as alias
end tell