This is just an apple script. I assign it to a keyboard shortcut key (ctl-cmd-n) and an touch bar button for Finder. I don't need the right click menu for that anymore
tell application "Finder" to make new file at (the target of the front window) as alias
BTT already has this function build inside. However it only creates .txt files, but I would like to be able to create .rtf files. Any chance to get this working through btt? Thank you
this is the script that BTT uses internally adapted to create rtf files:
try
tell application "Finder" to set the currentFolder ¬
to (folder of the front window) as alias
on error -- no open folder windows
set the currentFolder to path to desktop folder as alias
end try
set fileName to text returned of (display dialog ¬
"Enter name for new file:" default answer "newfile.rtf")
set absolutePath to POSIX path of currentFolder & fileName
do shell script "shopt -u xpg_echo; echo '{\\rtf1}' > \"" & absolutePath & "\""
Thank you, but its getting too complicated for me here. I will go on copying and pasting my empty .rtf file from the desktop for now. (would be glad anyway to select "create .rtf" fromt the BTT preferences one day). Thanks!