[TxMt] TextMate vs Applescript
Dr. Drang
drdrang at gmail.com
Tue Mar 18 02:26:40 UTC 2008
On Mon, Mar 17, 2008 at 8:32 PM, pascal at g <ymostudio at gmail.com> wrote:
>
> the principle of the script was to create folders and sub-folders, then
> create a new document in one of them with my text editor, save it with a
> title, bringing it to the front for entry.
If you delete everything after the 'tell application "Finder"' clause and insert
set briefDoc to (POSIX path of briefFolder) & "$.tasks"
do shell script ("touch " & briefDoc & "; mate " & briefDoc)
it should do what you want. I have to say that the use of a dollar
sign as a file name scares me a bit because it's a special character
in the shell, but with this change the script worked for me.
(I am curious why the creation of the Captures folder isn't put into a
'try/on error' block like the creation of the Briefs folder, but I'm
sure you have your reasons.)
> I have posted an entry on MacScripter, to hear that TextMate was "poorly
> scriptable, even Standard Suite is badly implemented".
> any solution to contradict that?!
TextMate is certainly not as AppleScriptable as BBEdit, but it is far
more scriptable with Perl, Python, Ruby, and the shell. In my book,
this is a big win for TextMate and the reason I switched a couple of
years ago.
--
Dr. Drang
More information about the textmate
mailing list