Not quite; the main goal is the creation of a group track. What you’ve proposed will be functionally identical to what my macro does since the group does not exist when I run the macro.
What I am doing is exploiting Cubase’s behavior - the fact that it automatically selects the newly created group - in order to run the lock command on the correct target. (Try running the command “Mixer - Add track to Selected: Group Channel” to see what I mean).
Unfortunately, if the target is not created (i.e. you click cancel on the “group creation” dialog), the original selected tracks remain selected, and any post-process commands will be run on those, resulting in the same function as my macro (locking the audio/instrument tracks).
Again it’s not a big deal, but I tend to forget I did that and then wonder why I cannot move some audio/midi tracks around later
But yeah, bailing on the post-process commands or simply adding a track operation “Lock” would resolve the issue, and probably prove beneficial for other uses as well.
Anyway I created a feature request if anyone stumbles upon this thread and wishes to vote it up.