Hi- 1st post ever on anything but I'm desperate! To the point-I have what I'm sure is a simple problem in getting macros to run. I programmed for a living and have looked up every reference to scripting in every Mach2&3 manual online and can't find any solution for what I am sure is a simple(but elusive) problem. The VB Script editior, final version of mach3, will run w/o error: setvar(100,Getvar(101)+3) M99 as a stand alone snippet of code in a macro I named M881.m1s. Using the Operator/#var monitor, I can verify the read/write results. First problem, which may bear on a second problem, If I place M99 on the line following the set/get,
setvar(100,Getvar(101)+3)
M99
the change of placement of m99 generates a compile error. Why??? I want to adjust #vars in g code program using conditional logic in my macro but when I embed my working setvar/getvar in a simple IF- Then- End if, I get compile and syntax errors in the Msg bar on the mach3 screen - the script writer (debugger) provides no clue as to what is generating the errors. I have tried placing the m99 at every conceivable location/s but to know avail. NFS help desk banished be to the forums for a solution. I hope that stepping into this thread isn't violating forum etiquette. If so, please offer kindly guidance on where to start. Thanks!