[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [femm] LUA something like runpre



Olaf Petzold wrote:
Hello,

I'm new here I want to use lua scripting. Unfortunally I didn't found
nothing about like run_pre - oppostite to run_post. I would like load some
lua scripts before the main script, e.g. set_current function defined
elswhere in another lua script file. Is there a way?

Regards
Olaf
You can call other lua scripts from within a lua script using the dofile command in lua, e.g.:

dofile("some_other_script.lua")

Rather than load the other scripts separately, you'd just place a few dofile calls at the beginning of your main script.

It is also possible to run the pre-processor with a "default" lua script calling the preprocessor with the command line:

femme -lua-script=c:\\temp\\junk.lua

where you'd insert the path to whatever lua script you want to run instead of c:\\temp\\junk.lua

You can modify the shortcut to femme in your start menu by opening the properties for the shortcut and changing the "target" line to:

"C:\Program Files\femm32\bin\femme.exe" -lua-script=c:\\temp\\junk.lua

with the exact path names depending on where you have placed your installation and default lua script.

Dave.
-- 
David Meeker
dmeeker@xxxxxxxx
http://femm.berlios.de/dmeeker