By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Lua for Take Command, release 1.0

I am pleased to announce the first release of my Lua plugin for JP Software's
Take Command command processor.

What is Lua for Take Command?

Lua for Take Command (LuaTC hereafter) is a plugin for Take Command
(http://www.jpsoft.com) to embed a Lua (http://www.lua.org) interpreter in the
command processor. LuaTC allows TCC batch files to take advantage of the
powerful Lua scripting language from within TCC.

Why is it different from standalone Lua?

Standalone Lua scripts do not have access to the Take Command process, so they
cannot (for example) set environment variables, or run internal TCC commands
without starting a new TCC process. However, LuaTC has direct access to the
TCC API, and can easily do these things.

A simple example, to set a variable from within Lua:

lua tcc.env["A"]="Set from Lua"

Where can I get it?

LuaTC is hosted on Google Code. The project home page is at


The binary release can be downloaded from


The sources are available from Subversion, via

svn checkout http://lua4nt.googlecode.com/svn/trunk/ luatc

Issues and feature requests can be reported on the Issue Tracker at

Google Code Archive - Long-term storage for Google Code Project Hosting.

What documentation is there?

Documentation is in the file Lua.txt, bundled with the DLL in the binary
release, and also available in a source checkout.

What versions of Take Command and Lua are supported?

The plugin was built using Take Command 9.0 and Lua 5.1.4. The binary
distribution embeds Lua 5.1.4, but can be built with any version of Lua 5.1.
The plugin has been tested with Take Command 9, but should work with 4NT 8,
and maybe even 7, as well (earlier versions of 4NT did not have a plugin

The binary has Lua statically linked. It does not need a separate Lua DLL to
run. It can load external Lua modules, but if these are in C, they will need
to link to the Lua runtime in the plugin. This can be done, but is not trivial
to get right (see lua-users wiki: Lua Proxy Dll Four and related pages
for some details on this). Using external Lua extension DLLs has not been
tested much, and should be considered unsupported at the moment. If anyone has
any success setting this up, comments on the lua4nt wiki would be much

Why is the project called Lua4NT?

The original version of the code was written at a time when Take Command was
called 4NT, so Lua4NT seemed a good name. However, 4NT was since renamed, and
an alternative Lua interface was released by Thomas Lauer, also called Lua4NT.
When I came to release version 1.0, I decided to name the binary distribution
LuaTC, to avoid confusion. Renaming the project on Google Code is another
matter - I don't know how easy that would be, if it is even possible.


Feedback is welcome. I can be contacted either via the project issue tracker,
or by email at [email protected].
Last edited by a moderator:

Similar threads