OmniFocus 3 create sub-tag

I want to make a macro that would make it easy for me to create a new sub-tag in a specific place in the tag hierarchy from the tags input field. This is above my competency -- I'd appreciate some help.

OmniFocus 3 now uses Tags. You can create nested tags like this:

Places
   Home
      Garage
   Work

When you type in the Tags field in the Quick Entry window or in OF3, it displays the tag choices in a Spotlight-like manner. For example, the "Garage" tag is offered in the drop-down menu as:

Places:Home:Garage

If you wanted to add a new sub-tag for "Home" called "Pool," You could add it from the tags input field by typing Places:Home:Pool, and then pressing Cmd-Return to create the new tag.

The strings can become long, and if you make any mistakes, OF3 will make new tag structures that you'll need to clean up later.

I'd like use KM to select a tag from the hierarchy, and then auto-create a correctly structured string to create a new sub-tag at that location.

It would work like this:

  • I move the cursor into the tag input field either in the Quick Entry window or in OF3
  • I fire the Make New Tag macro in KM
  • KM asks me to input the local name of the new tag
  • KM offers me a list of the entire tag hierarchy
  • I click on the tag that I want to be the parent of the new tag
  • KM creates a string from : and types it into the tag input field
  • I review the new tag string and make changes if necessary
  • I press Return, and OF3 creates the new tag in the correct place.

I appreciate your help as always.