My goodness, this is getting interesting!
Again, thank you for giving the macro a try and your kind words.
I am delighted that what grew out of a discussion about looking up a single type of nested action has turned into something of use.
At a glance it appears that way to me too. I will give a look see for sure!
Just to be sure though, it sounds like you want to be able to have a sort of dynamic color scheme that you can toggle by enabling and disabling actions?
In the meantime, how about creating a separate macro for the sub-color schemes?
It seems it wouldn't take much to turn the "Color Code Actions" macro into a subroutine, with a parameter for the settings variable "localColorSchemeMacroName". (I had some sort of vague imagining that it could be used this way.)
Or maybe pass the parameter in an Execute Macro that calls the Color Code Actions macro?
In either case, how does having a separate "color code manager" macro run your color coding system sound?
Or is a single "Action Color Scheme" that contains everything better?
The script could look for engrouped actions by name, or notes, enabled status, perhaps, but then again, maybe a separate macro...?
Sharp breath intake. . I it might be possible.
This script uses the handler by Kevin Funderburg to flatten the list of the target macro.
As such, the actions all come out as top level actions. Maybe, just maybe, there might be a way of using node indexing as a way querying level. That means, I think, having three versions of the actions list: list of AppleScript actions, array of dictionaries (aka, deserialized action xml, aka plist object), action nodes. Query the plist object with predicates (or nodes with xpath, maybe), get the index, check the level using NSXMLElement's "level" property. Set some rules, somehow. I think.
That would be an undertaking for a rainy day, maybe a monsoon month. I'm not sure it's in the forecast.
Then there is an alternative native NSXMLDocument method of querying and generating AppleScript paths, which doesn't require AppleScript actions at all. That would eliminate the triple version indexing, but...yikes, might not be any better. Given my druthers, I'd rather navigate by boolean predicates that XPathing around.
BTW, out of curiosity, if you know, how is the "turn Edit mode off" during color editing impacting usability on macros with large numbers of actions?
My pre-Cambrian setup sez it helps, but not so much when macro's actions get over 200.