Repetier custom scripts

In repetier there are 5 numbered buttons for custom scripts.

I was trying to put one in with two commands

G1 Z10 F240
G1 X0 Y0 F2400

Basically, move above starting z by 10mm
then to x0 y0

…it’s only running the first command.

How do I write multiline scripts? This seems like a trivial thing, and I’m sure I’ll smack my forehead when someone replies

What if you put slash n in between?

G1 Z10 F240\nG1 X0 Y0 F2400

Just a guess. I have no idea if RH will handle that or not.

Are you sure you are not at a position that the MPCNC things is 0,0? What happens if you change the second line to something like:

G1 X20 Y20 2400

If you copied and pasted the script into the dialog, try typing it directly into the dialog. Sometimes there issues with carriage return and line feeds that can be messed up with pasted text.

Given your explanation of “G1 Z10 F240” as "move up 10 units from the current Z position, I infer you are using relative coordinates (sometimes called “incremental moves”). If you’re using relative coordinates (G91) , G1 X0 Y0 F2400 is going to stay in the same place because it is saying “move 0 units in X and 0 units in Y”, not “move to absolute coordinate X0 Y0” which is what you seem to be expecting. You can use the G90 command to switch to absolute coordinates, but be careful to switch back if your later job is expecting relative moves.

I think the macro you want is:
G1 Z10 F240
G90
G1 X0 Y0 F2400
G91

I’ll try some of these out this evening. Thanks.