You shouldn’t use the macro recorder when you use my macro.
Please open a new file, paste the above macro, and save it as “a.jsee”.
Please select “Select…” on the Macros menu to select this macro (a.jsee).
Then open a .xsb file, and click “Run Macro a.jsee” on the Toolbar.
I hope this helps.