步驟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
-
編輯器
+關注
關注
1文章
807瀏覽量
31328
發布評論請先 登錄
相關推薦
如何快速創建用戶自定義Board和App工程
![如何<b class='flag-5'>快速</b><b class='flag-5'>創建</b>用戶自定義Board和App工程](https://file.elecfans.com/web2/M00/37/D7/pYYBAGI9l9uAOwALAAAmFmqVYdg094.png)
AD軟件打開DigIPCBA工作區,希望可以按照文件夾檢索
Win10系統PowerShell命令匯總
服務器數據恢復—raid5陣列上層文件夾丟失的數據恢復案例
![服務器數據恢復—raid5陣列上層<b class='flag-5'>文件夾</b>丟失的數據恢復案例](https://file.elecfans.com/web2/M00/A6/DD/pYYBAGRnJNKAXD2SAATHN3bJJ9Q479.png)
引用外部文件夾中的頭文件時,如何讓VSCODE不提示波浪線錯誤?
PMG1S3如何收集數據,并使用Modustoolbox將其輸入文本文件?
stm32f407 fatfs文件系統,f_mkdir創建文件夾耗時長是什么原因導致的?
飛凌嵌入式ElfBoard ELF 1板卡-ubuntu創建共享文件夾
Browser Company推出Arc瀏覽器實時文件夾功能,兼容Git
OpenHarmony開發技術:【國際化】實例
![OpenHarmony開發技術:【國際化】實例](https://file1.elecfans.com/web2/M00/C8/C0/wKgaomYWoeKAUzmXAAFZ07_FPws353.jpg)
評論