[TxMt] Re: Setting the filename in save dialog

Martin Winter lists at martinwinter.com
Tue Nov 28 23:48:52 UTC 2006


Thanks, Jacob -- I hadn't received your reply before sending my reply  
to Kevin. I agree that this would be a good solution, at least for  
the time being.

Martin


Am 29.11.2006 um 00:37 schrieb Jacob Rus:

> Martin Winter wrote:
>> is there a way to set the filename that will appear in the Save  
>> dialog when saving an untitled document? Using TM_FILEPATH perhaps?
>
> You could probably make a new save command that uses applescript to  
> pop up a save dialog with whatever name you want.  You can get the  
> filename that the user selects with something like the following  
> applescript:
>
>     set theFilename to choose file name ¬
>         with prompt "Save New Document As:" ¬
>         default name "whatever_you_want_here"
>         default location «some location alias»
>
> Then just return the path from the applescript to the command, and  
> have it save the current document out to that path.
>
> -Jacob



More information about the textmate mailing list