Thanks for the tip! Always a pleasure to avoid applescript...
I actually tried that before and couldn't get it to work. The problem seems to be that saving from the menubar (or from the keyboard shortcut) is not recorded during the macro. Do macros only record automations (snippets, commands, etc.) or do I have something setup wrong? I couldn't find this documented anywhere.
I ended up getting around this by defining ANOTHER command that saves the current file but then does nothing, then recording a macro where I execute both actions. Seems to work great, except it doesn't seem to be saving new files, so I have to just save it twice the first time. Not a problem for me, personally.
Oh course, it's ugly to have two commands and a macro sitting around in a bundle, when there really should be only one. Anyone else think it might be useful to have a ''save after'' check box or something in the command window?
Thanks again, Jim
On 30/1/2006, at 21:45, Jim Bagrow wrote:
Oh course, it's ugly to have two commands and a macro sitting around in a bundle, when there really should be only one.
You can however remove the commands after having recorded the macro as they are deep-copied into the macro.
An alternative command might be using something like: cat
"$TM_FILENAME" (with input set to the entire document), but this
isn't ideal as you'd then have to handle the case where the file is unsaved (and thus have no name).
Anyone else think it might be useful to have a ''save after'' check box or something in the command window?
I plan to expand the activation method of a command to mouse gestures (like double click, right click for context menu etc.), drop actions (like dropping of files, URLs, colors etc.), various events (like before/after save), and similar — this however will likely cause a larger change in how the activation method is specified (I do have several things that needs to be changed with the current bundle editing system, so it's a “major” change, not a simple addition of a check box)…