怎样在Finder文件夹中创建一个快速文本文件

电子说

1.2w人已加入

描述

步骤1:将AppleScript图标添加到OSX菜单栏

编辑器

在AppleScript编辑器内部(在OSX应用程序-实用工具中)转到首选项-常规,然后选中

[x]菜单栏中的显示脚本菜单

步骤2:将此脚本添加到用户脚本中

-- H.Zimmerman, AppleScript.

-- Create text file in current Finder folder with a dialog.

tell application “Finder”

try

display dialog “name of doc please (without the .txt thing)” default answer “”

set fileName to the text returned of result

if length of fileName = 0 then

return 0

end if

set fileExt to “.txt”

set thisFolder to the target of the front window as alias

set newFile to fileName & fileExt

make new file at thisFolder with properties {name:newFile, file type:“TEXT”, creator type:“ttxt”}

on error errMsg

display dialog (errMsg)

end try

end tell

步骤3:创建文本文件

编辑器

在相应的 Finder 文件夹中,只需选择刚添加的菜单项,输入名称,文件即已存在。双击它将打开熟悉的文本编辑。
       责任编辑:wv

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分