Hello Guest it is April 18, 2024, 07:44:39 PM

Author Topic: Lua Question  (Read 1921 times)

0 Members and 1 Guest are viewing this topic.

Lua Question
« on: February 20, 2015, 11:09:30 AM »
Hello All,
  Is there some way to put 2 functions in a script and be able to choose which function you want to run using a checkbox control and it would run one or the other but not both?  I am not a computer programmer at all.

Thanks
Dave

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Lua Question
« Reply #1 on: February 20, 2015, 12:39:52 PM »
Yes there is you can use a normal Message box and a IF then statement to look at the respond IF yes then do one else do the other. That keeps it simple.

Beware IF you do not compose it all correctly it can cause KAOS with mach4. I learned that the hard way with SheetCam. One wrong piece of code (1 line) brought down the entire program.

Beware untill we get proper documentation on the structuring of LUA in Mach4.

Just a thought, (;-) TP
Re: Lua Question
« Reply #2 on: February 21, 2015, 07:02:42 AM »
I tried using the "IF then" with a "goto" and a label but it doesn't ever got to the first function it will just skip over the first function and go to the second function.

Thanks
Dave