Macro muddle

I’m trying to write a macro which will delete a selection, close up the gap and play from a pre-roll before the edit.

Can anyone see what I’m doing wrong?

Transport - Locate Selection
Transport - To Left Locator
Edit - delete
Edit - Select from Cursor to End
Edit - Move to cursor
Transport - Use Pre-roll
Transport - StartStop
Transport - Use Pre-roll

It all works if the cursor is already at the start of the selection when I run the Macro - in other words, the To Left Locator command doesn’t seem to happen. If the cursor is anywhere else, the parts after the cursor get moved to the cursor position.

Many thanks