Macro Command for Selecting Last Track

I’m building a macro to mix and render my project to a new track and then select just that new track before applying some other effects to it and exporting it. But I haven’t been able to get the macro to select just the new track so that I can automate other things on it. Moving focus to it doesn’t select it and I’ve tried all the select steps but I can’t get them to select just the new track. Is there a way to do this? I’m attaching a screen shot of the macro but keep in mind I’ve tried a lot of additional steps below what you see here that didn’t work, so I removed them from this screenshot. I’m on MacOS 11.2.3 and I’ve tried this macro on both 2.4.2 and 3.0.0 of audacity. Has anyone else encountered this? I searched the forum but this particular scenario didn’t come up in my search. Thanks!
Screen Shot 2021-04-17 at 10.39.33 AM.jpg

How many tracks are in the project?
If it’s a fixed number of tracks then you can use the “Select Tracks” command. Note that for this command the top track is numbered 0.

The number of tracks varies. That’s part of what I’m up against.

In that case, try this:


That did it! Thank you so much!!