Folder Events do not properly deselect when PLE commands executed

I’m having double with this, Folder Events getting in the way of executing PLE scripts.

For example.

I want to select all markers across multiple marker tracks in a big project but - only markers - that are under my cursor… Trying to accomplish this in the simplest way before doing a multi PLE/macro daisy chain.

The closest I am getting is this:


((With 'Track Selection Follows Event Selection ENABLED))
-Select All (also selects all tracks with events)
-Select Under Cursor (selects events on selected tracks under cursor, thus, removing tracks without events under cursor)
–>PLE->>
_________-Media Type is Equal to ‘Marker’
_________-Container type Equal to ‘Event’
_________-Property is set ‘is Selected’

Function: Select


This works, except for that Folder Overview Events don’t deselect as everything else that is not a marker track does.



edit

I’ve figured maybe, I need to make visibility part of this script, so that only marker tracks are visible when executing the select all commands and then Undo Visibility to return to the previous state.