Hello Guest it is April 19, 2024, 06:59:24 PM

Author Topic: Lua script command  (Read 2072 times)

0 Members and 1 Guest are viewing this topic.

Offline Julie

*
  •  18 18
    • View Profile
Lua script command
« on: April 07, 2017, 08:44:01 AM »
Hello,

I'm converting VB script to LUA script.

<VB script>
Call SetOEMDro(802, ZeroOffsetZ)

How can I change that by Lua script command?

Offline Julie

*
  •  18 18
    • View Profile
Re: Lua script command
« Reply #1 on: April 10, 2017, 01:27:28 AM »
I solved it. :)
Re: Lua script command
« Reply #2 on: April 10, 2017, 01:53:48 PM »
Hyojung,
You should put your solution on this thread so others can see what works.
Chad Byrd

Offline gorf23

*
  •  189 189
    • View Profile
Re: Lua script command
« Reply #3 on: April 10, 2017, 02:47:23 PM »
If you want to call a global function that has been put into the screen load script, is there a special way to call it from a script

I put a WriteRegister function in the load screen script  but if I try to call it from a button script I always get the error
attempt to call global 'WriteRegister' (a nil value)...

Is there a special way to call functions that are in the screen load script or do I need to add it somewhere else also
it will run fine if I have the function in the button script and run debug...

Thanks

Offline Julie

*
  •  18 18
    • View Profile
Re: Lua script command
« Reply #4 on: April 19, 2017, 07:37:07 AM »
Cbyrdtopper, sorry.
I changed it as shown below.

mc.mcAxisSetPos(inst, 2, ZeroOffsetZ)

But I thought I solved it, but I do not know if it is correct.


« Last Edit: April 19, 2017, 07:43:50 AM by Hyojung »