Is there any way to select tracks by script? Selection.activeObject isn’t working for me.
That should work, it is what Timeline uses internally to select tracks, which are just ScriptableObjects. I’m not sure why that wouldn’t work for you, maybe call TimelineEditor.Refresh(RefreshReason.WindowNeedsRedraw) to repaint the window?