Hi,
I don't think there is a way to write code to the codebuffer of Mach3.
But you can write to a teachfile as you can do it with your wizards.
Generally spoken, you can do everything in a plugin what you do in a script, and something more
So I have moved some bigger VBA-Skripts to a plugin just by a VBA to C converter and a little handwork.
scripter.OpenTeachFile("teachtest.nc");
// some sample code for the teachfile
scripter.Code("G0X100Y100");
scripter.Code("G1Z-10");
scripter.Code("G1Z0");
scripter.Code("G0X0Y0");
// finish and load it
scripter.CloseTeachFile();
scripter.LoadTeachFile();
just tested this code, but I'm not working with the VS2008 wizard, I'm with VS 2003
regards,
Steffen