If you search the forum for “GSender”, “macro”, @neilferreri I think you’ll find what your looking for on the Bitsetter as I believe he’s already worked on the macro/gcode for that.
Edit: Actually I think this is the post I was referring to Bitsetter and GSender