Thanks, mouser. The reason I'm asking is because I'm trying to find the "least astonishing" behavior, and in this case it's not obvious to me. There is of course a story behind the question. I have a fairly complex command execution engine for KeyNote. It has a UI builder on one side, which lets you tear down the default menus and toolbars, all of them, and create your own from scratch. (Allowing only one menu to be customized makes little sense, because the mechanism required to run it is exactly the same as the mechanism that allows you unlimited customization.) Another part of the scheme is a macro engine, which records and replays commands and, yes, persists them as scripts that you can easily edit.
Basically, commands have required and optional parameters. The optional parameters fill in default values, while required params must be given explicitly. So for example, a File|Open command looks like this in a menu configuration file:<menuitem command="fileOpen" />
When this is triggered, the engine finds that the required "filename" argument is missing, and finds a handler for the command that gets the filename (e.g. by putting up a dialog box). The command also has an optional "readOnly" parameter, which defaults to false. What this lets you do is add a menu item like this:<menuitem command="fileOpen" fileName="c:\somefile.txt" readOnly="true"/>
In short, you can put a mini-macro right in the menu. This, I hope, would be useful for things like commonly used font styles, etc - instead of going through a dialog box every time, you can add a custom menuitem that defines all the style settings. When you do so, you can specify whatever parameters you need, and the engiine will either fill in missing optional params, or prompt you for the missing required ones.
But once you have this, you need to figure out how much information to store when recording a macro the "normal" way, for replaying. For each command I can either store just the command itself (which would require user action on replaying, if the command has any required parameters), or I can store some/all of the actual parameters used for the command.
I agree with you about seeing what it does and tweaking the scripts manually, but most people won't go as far. For them, I need to provide the most useful behavior out of the box.
On edit: And you will be able to have a three-way toggle
<bold/> by itself would toggle, and then there's <bold on="true"/> and <bold on="false"/> to force it either way. I'm sinplifying the syntax here, but just to give the idea.