Need Help With This Macro?

Trying to create a macro that will render a track with current settings, disable the track, then hide it.
It’s ALMOST working, but it’s not hiding the track. See examples of the macro script, and the result I’m getting…any advice ?

Thanks
Tom