Macro Creation Tutorial

Ok… question…

Say I have a macro definition and I want to pass a parameter to it. I imagine it something like this:

TEST X

X IS the parameter and value you could say…

I played around with this:

Function:
[gcode_macro TEST]
gcode:
{ action_respond_info(“OUTPUT: {}”.format(params)) }

Call made: TEST XYZ=1

and the output is: ‘OUTPUT: {‘XYZ’: ‘1’}’ … the array… again… not what im looking for.

I suppose one way you could look at it as I want to pass a parameter name only to TEST and not a value along with it… so in sudo code something like this:

[gcode_macro TEST]
gcode:
{ action_respond_info(“OUTPUT: {}”.format(params[0].name)) }

and get the output: ‘OUTPUT: X’

How can I accomplish this?