(2022-03-25, 22:33)N. W. Perry Wrote: Couldn't I also move the local variables col and ref up higher somewhere, so I don't have to repeat them?
Yes, just write them without the value assignment.
(2022-03-25, 22:33)N. W. Perry Wrote: My next attempt will be a macro to comment out BUFEXCHG lines. I think I know how to identify the affected ref lines, now to learn how to actually alter them. :-)
scripts can't actually modify lines on a string level (mostly because of the undo tracking), but you get the same effect by creating a new line and deleting the old one.
For an example of this see the global mlcad.lua script.