Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: rrc1962 on April 21, 2015, 11:09:34 PM

Title: Basic scripting question
Post by: rrc1962 on April 21, 2015, 11:09:34 PM
I've stared the process of porting all of my macros over to Lua.  I'm familiar with the language, but not the mach4 API.  What I'm trying to do is create a macro that pulls data from DRO's on the screen.  I added the DRO's but so far have not been able access them.  I used the examples in the scripting manual with no success.

If I had a DRO named "test1", how would I read that into a local variable?

Thanks
Title: Re: Basic scripting question
Post by: poppabear on April 22, 2015, 08:34:23 AM
use the screen calls,  local myDro = scr.GetProperty("test1", "Value") see tool box for the screen calls

Scott
Title: Re: Basic scripting question
Post by: rrc1962 on April 22, 2015, 10:10:54 PM
I knew it had to be something simple.   Thanks.