展示
可以结合
BetterAndBetter
进行快捷操作使用
源码
tell application "Finder" to set currentFolder to insertion location as alias
set newfilename to ""
display dialog "请输入完整的文件名" default answer newfilename buttons {
"取消", "确定"} default button 2
if button returned of result is "确定" then
set newfilename to text returned of the result
set currentFile to POSIX path of currentFolder & newfilename
do shell script "touch \"" & currentFile & "\";open \"" & currentFile & "\""
end if