While Neil’s suggestion is a good one, there’s a native way of doing this opening the preferences panes. This should open and bring to front TimeMachine preferences pane even if it’s already open, hidden, minimized etc.
I would swap the order of the two actions so it doesn’t fail if there aren’t any windows open already. (Or just disable the notification and failure aborts options, but I don’t like failure messages in my log at all haha)
It turns out the action order doesn't matter; each has its failure points, but turning off failure notifications makes it a moot point (unless you have a thing for pristine logs...).
Yes, this is a regular expression that matches anything, which ensures that Sytem Settings is unminimised regardless of the window title (i.e. which preference pane is active).
This isn't needed if you use the action order proposed by @cdthomer, so you can do it that way round with an explicit window title if you like.
It's the friendliest race in the world where everyone's a winner because even if they don't cross the finish line, they still qualify for next time, with everyone else cheering them on. I love this forum.
I had a major crash on my MBP which took local Apple store some while to find (corrupt system and recovery software) and fixed by doing complete rebuild but unfortunately using Sonoma (I was running Ventura and those are my 3 TM Back Ups). Still trying to enable all the various permissions which I am still struggling with.
The point of this reply is the macro you uploaded no longer works as the open Time Machine preferences opens the 'General' panel of preferences. Any more thoughts to cure this?
I’m still on Ventura (and from what I hear about Sonoma won’t be upgrading to it anytime soon, if at all), so I’m not sure what the issue might be. But there are a fair number of other members here that are on Sonoma and might pitch in soon.