Enhancement for Set FORMAT command / or scripted format support

Hi guys,

I'm at the tail end of a script I'd started/stopped/restarted a bunch of times, and I'm just about done (yay). While implementing a great idea another user gave me - it ocurred to me that it would be really useful to have the following capability around format control:

RAW Command Support: Set FORMAT=!prev

Script Support: Allow us to SET the current formatting from Tab.Format.format_explain

An enhancement like one of these would allow a script to GET the current tab format, then make changes using normal controls... but also have a convenient way to SET it back to the state it was in before having modified the format. If not an actual script based method (for instance a new Tab.FormatSet or similar method), then perhaps something like how the RAW Go command allows us to pass it a TAB object from within a script in order to determine what tab is operated on... perhaps we could have a similar ability to use a RAW command from within a script such as: Set FORMAT= where is a stored copy of the Tab.Format.format_explain Vector.

NOTE: ideally you could consider BOTH enhancements, but if I had to pick one - I guess I'd pick an extension to the RAW command since BOTH script developers AND regular RAW command users could make use of it.

Does this make sense?

We'll be adding a command to reset the format to the one you'd normally get for the folder, which might be what you want (at least some of the time)?

(Actually, the command is already there, it just doesn't work right: Set FORMAT=!folder - At the moment it gets the current format and then sets that as the current format, which is basically a no-op.)

Hey Leo - thanks.

I was aware of the !folder argument - and it's actually what I'm using now. And though that IS working as expected, it's not ideal - since whatever the normally derived format for a folder is might not actually be what the user just had turned on... i.e. I might have just clobbered a manual change to the folder format made by the user, and would be returning it to the normal format as if they had re-entered the folder again. But that's not what I want, I want to return it to ~whatever it was before I changed it.

My use-case here is setting a FAVORITE folder format in the event of a condition within my scripts operation, and then set the format BACK to ~whatever it was before I changed it once the condition is resolved.

Not sure when the !folder arg got broken though. I'm using 11.16.1 and 11.16.3 on my two test systems, and it seems to be working as expected. All I'm changing in my FAVORITE format though is the background image and background color options...

Either way - would still really love you to consider giving us one of the proposed ways of setting the format back to whatever it was via a RAW command, Script method, or both.

Maybe !folder was only broken on our long-term development branch, if it's working OK in 11.16 for you.

Makes sense.