Vmax549 wrote::twisted: I am stating a new function project. Teh object is to Make this line of Gcode work.
M65 (" if(6<=7){exec.Code("M98P2");} ")
Basically it is taking teh String inside of teh brackets and turn it into a working line of code INSIDE of teh M65 macro. I use Dezsoes M56 Code to retreive teh string. That was teh easy part.
Once shown how to do it's always the easy part....LOL
For here I used the split method to keep as string. What's needed/trick to do so UCCNC excepts as Gcode string is replace all code inside parentheses with brackets where parentheses are needed, the macro will replace the brackets with parentheses.
Example:
Your code>>>>>>>>>>>>>M65 (" if(6<7){exec.Code("M98P2");} ")
What's needed>>>>>>>>>M65 (" if[6<7]{exec.Code["M98P2"];} ")
Hope this helps,
Dan
This has no testing other than to see if works!