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

# Re: [femm] LUA something like runpre

- To: femm@yahoogroups.com
- Subject: Re: [femm] LUA something like runpre
- From: David Meeker <dmeeker@ieee.org>
- Date: Sun, 01 Dec 2002 10:03:06 -0500
- References: <002701c297a8$949b49a0$0c02a8c0@wit.regiocom.net>
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826

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@ieee.org
    http://femm.berlios.de/dmeeker

- References:
  - LUA something like runpre
    - From: "Olaf Petzold" <opetzold@wit.regiocom.net>

- Prev by Date: LUA something like runpre
- Next by Date: Re: [femm] Default file location
- Previous by thread: LUA something like runpre
- Next by thread: "nonlinear time harmonic" solver again.
- Index(es):
  - Date
  - Thread