Hello all,
is there a way to set the filename that will appear in the Save dialog when saving an untitled document? Using TM_FILEPATH perhaps?
Martin
As far as I know, the answer is no.
And you can't modify the environment variables like that. Environment variables in children are invisible to parents (so any changes your command makes can't be seen from TM).
On Nov 28, 2006, at 1:07 PM, 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?
If this is not possible at the moment, I think it would be a nice new feature.
Here's the scenario where I think this would be useful: I create a new blog file from a template and upload it to the server, upon which the URL (permalink) is inserted into the document. I would like to save the still untitled file locally under a name that includes elements of the permalink, such as the date and post slug. Instead of having to copy and paste (and strip the slashes), it would be nice to be able to create a save command that automatically inserts the appropriate information into the save dialog.
Although this is very easy to do programmatically -- as you said, the problem here probably is the structural barrier between the document and the application.
Martin
Am 29.11.2006 um 00:19 schrieb Kevin Ballard:
As far as I know, the answer is no.
And you can't modify the environment variables like that. Environment variables in children are invisible to parents (so any changes your command makes can't be seen from TM).
On Nov 28, 2006, at 1:07 PM, 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?
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
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