[TxMt] Re: AppleScript to save TextMate file with path
Patrick James
pj002 at mac.com
Wed Sep 3 18:22:30 UTC 2008
On 3 Sep 2008, at 17:19, Allan Odgaard wrote:
> On 3 Sep 2008, at 13:34, Patrick James wrote:
>
>> I've been trying to write an AppleScript to save any open TextMate
>> file into a specific folder [...]
>
> Sorry, but TextMate doesn’t really do AppleScript.
>
> Does this need to be invoked from outside TextMate? Otherwise a
> command can do this.
Hi
It doesn't need to be invoked from outside TextMate and a command
would be excellent :)
The date format I would like to name the files to be saved is:
yyyy-mm-dd-hh-mm-ss
These all go to one folder so the path is always constant, I can just
put that into a variable in the script.
I don't know anything about Ruby or command line but I have got
learning Ruby on my list of things "to do" :)
This ability to save a file with date and time is something I miss
very much from when I was using that other editor. I used it all the
time because it means that any text or html code or what-have-you can
be put into a file and then saved at the click of a menu item. It
means that I can work on it knowing that if the computer crashes it is
okay. Then when finished I take the text/html/whatever and put it into
the thing it is intended for.
Patrick
http://www.patrickjames.co.uk
More information about the textmate
mailing list