It sounds like you somehow hit the Run From Here Button. That's what the "strange window" you saw probably was. You're code runs through without any issues here.
You really need to learn how to edit the post processor your using, as there are a lot of things in that code that really don't need to be there, and others that shouldn't be there at all.
G90 and G91.1 do two different things, and you shouldn't replace G90 with G91.1. They both should be there, and you do have both, with G90 on line N104. They must be on different lines.
After the tool changes, you're doing a tool length offset, G43. You don't want to have these in there, as they can change the Z zero setting, depending on what you have entered in your tool table.
On line 102, you have G8 P1. Mach3 doesn't support G8, whatever it may be??