Lua sharing data with batch files

Jun 28, 2008
I recently installed Take Command with Lua. I am new to Lua but have been using 4Dos, 4Nt, and Take Command since the mid-1980s. I have never used Lua, but I like what I see. My question is how do I share information, data, between Lua code and Take Command code? I have found os.getenv to get information from my operating system environment table. But I have not found a corresponding setenv or putenv. It seems to me that I can share information from Take Command to Lua script, but I cannot see how to get information back from Lua script to my original batch script. I am probably missing something obvious, but if someone can give me some guidance I will appreciate it.
May 20, 2008
Syracuse, NY, USA
winapi.setenv(name, value)?

I have read that it only child processes see the new variable. I'd guess that that's not true if LUA is embedded, and that the current process's environment will be changed.
Let us know.
May 20, 2008
Syracuse, NY, USA
Rex, is TCC's LUA support extensible with "modules"? If so, and the OP is interested, I found a winapi.dll (module) supposedly for LUA 5.2.
Similar threads
Thread starter Title Forum Replies Date
T Take Command 28: Lua reports version 5.4.0 (5.4.3 expected) Support 0
fpefpe Documentation LUA and friends Support 4
T Returning a value from internal Lua scripts to TCC Support 2
H Lua and lpeg Support 1
D Lua does not work on the commandline Support 5
D Fixed @Lua does not behave as documented Support 8
fpefpe How to? LUA script Support 0
fpefpe How to? Lua Examples Support 1
H lua Causes Take Command Tab to Exit Support 5
jbarnes1967 TC 18.00 x64 issue with lua io.popen() Support 2
M How to make Lua modify env-vars Support 18
Joe Caverly Internal Lua and require Support 0
jbanaszczyk LUA, tcmd.chm, TCC/LE problem Support 0
Jay Sage Executable Extension with Lua Support 5
tmaynard Invalid item name "Lua" Support 6
vefatica Help LUA Support 1
JohnQSmith Documentation Lua Support 0
p.f.moore Lua for Take Command, release 1.0 Support 0
T Plugins for Lua and Idle Support 4
C sharing global histories between different TCMD versions? Support 5
vefatica Sharing violation in IDE Support 8
S How to? best way to compose data for command to use out of presets/variables Support 1
vefatica Finding files with alternate data streams? Support 4
D Pasting Unicode data has different behavior on TCC and CMD Support 2
J WAD Output redirection in tcexit looses data Support 31
C Win7 Program Data.... Support 2
vefatica Fixed TYPE http://... incomplete data Support 40
D ftps gives "Unable to build data connection" Support 5
T @ping: response code, data size and documentation incorrect Support 2
p.f.moore Best way of embedding data in a BTM file Support 12
A GPF when copying large amount of data on busy USB Drive Support 3

Similar threads