如何创建出现在“服务”中的Finder自动机项,以便在文件夹内创建新的文本文件?我使用TextMate,如果解决方案与编辑器无关(而不是使用TextEdit),则更好。
我的操作方式:创建一个虚拟文本文件,并将其存储在文档的某个文件夹中(每次服务运行时,该模板均用作模板)。然后,我如下创建工作流(服务):
现在,您要做的就是右键单击要放置新文件的文件夹,然后选择通过保存此工作流程创建的服务。
To open the newly created file, you can add an "open Finder items" action in which you would obviously select TextMate rather then TextEdit. To make it editor agnostic, you can tell it to open with its default application, and it will do so.
If asking for the name at runtime is very important to you, you can add a get text action, and assign it to a second variable, then add a rename action after the copy action and say replace text, replacing the name of your template file with the text variable. By default, you can't use text variables in the way I described, but the following post provides a work around of doing so. I know it works under 10.6, and may or may not work under earlier version of OSX.
see here for instructions
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句