Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: gorf23 on April 03, 2017, 03:54:58 PM

Title: lua script require() question
Post by: gorf23 on April 03, 2017, 03:54:58 PM
is there a way to use require() in a lua script without having a file dialog box loaded,  or is that another lua command to do the same call without a file dialog box.
It seems to works for calling a lua script from another lua script and being able to pass variables just don't want to wait to pick the file...

thanks
Title: Re: lua script require() question
Post by: DazTheGas on April 03, 2017, 04:55:09 PM
The require function is to load modules, take a look in the Screen Load Script and see how its being used there.

DazTheGas
Title: Re: lua script require() question
Post by: gorf23 on April 04, 2017, 04:51:26 PM
Thanks daz

I used some code form the load screen script it works, it will load my module and run it... But it always pop's up a file dialog box i have to pick the file and click ok
I just want the module to load and run with no file box...

Thanks
Title: Re: lua script require() question
Post by: smurph on April 20, 2017, 04:41:28 PM
This is a path issue.  If lua can't "find" your module, it will ask you where it is via the file dialog.  Make sure the module's path is in the package.path.

Steve