步驟1:將AppleScript圖標(biāo)添加到OSX菜單欄

在AppleScript編輯器內(nèi)部(在OSX應(yīng)用程序-實(shí)用工具中)轉(zhuǎn)到首選項(xiàng)-常規(guī),然后選中
[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:創(chuàng)建文本文件

在相應(yīng)的 Finder 文件夾中,只需選擇剛添加的菜單項(xiàng),輸入名稱,文件即已存在。雙擊它將打開熟悉的文本編輯。
責(zé)任編輯:wv
-
編輯器
+關(guān)注
關(guān)注
1文章
828瀏覽量
32979
發(fā)布評論請先 登錄
飛凌嵌入式ElfBoard-Linux系統(tǒng)中的文件分類
VS Code 中`xiaozhi-esp32` 項(xiàng)目文件夾 修改 I2C 設(shè)備地址為 `0x78`
飛凌嵌入式ElfBoard-標(biāo)準(zhǔn)IO接口之讀文件
QEMU快速上手(Win),源碼文件夾對不上是為什么?
實(shí)現(xiàn)litterfs后,打不開文件夾怎么解決?
請問bsp文件夾中各芯片廠商的外設(shè)drv文件都是由芯片廠商自己開發(fā)的嗎?
軟件包加入后不顯示packages文件夾是怎么回事?
在對廬山派K230的SD卡data文件夾進(jìn)行刪除和新件文件夾時無法操作,且訓(xùn)練時線程異常,怎么解決?
迅為RK3588開發(fā)板Android13系統(tǒng)掛載samba共享文件夾-怎么開啟Windows共享目
怎樣在Finder文件夾中創(chuàng)建一個快速文本文件
評論