Lua and Env(ronment-Vars).
Some time ago, I tried mixing .bat-files and .exe-files (from C/C++) code and was disappointed to being not able to use the setenv()-functions, i.e. not being able to set an env-variable in the .exe-file, which could be evaluated afterwards from my .bat-file.
Now I am wondering, if this could be done in Lua, a scripting language I am interested in, but totally new.
So I was happy, when I found information, where exactly this issue was adressed and stated, it would work:
http://jpsoft.com/forums/threads/lua-for-take-command-release-1-0.437
Unfortunately it turned out, this was kind of a plugin for a former TC-version and the examples in there do not work in TC16.
So, is there a way to call from within a .bat-file a .lua-file and let it modify some env-vars, the .bat-file-caller can evaluate?
Or how do you guys pass arguments between a .bat-file and a called script/exe-file? My workaround was to make the exe-file create a new .bat-file, in which the env-var is set (e.g. SET _TMP_ENV=abc) and call it later from within the original-.bat-file.
Thanks a lot...
Btw: I was searching for Lua within the TC-forum, but got the message
The search could not be completed because the search keywords were too short, too long, or too common.
So might be this issue was already discussed somewhere...
Some time ago, I tried mixing .bat-files and .exe-files (from C/C++) code and was disappointed to being not able to use the setenv()-functions, i.e. not being able to set an env-variable in the .exe-file, which could be evaluated afterwards from my .bat-file.
Now I am wondering, if this could be done in Lua, a scripting language I am interested in, but totally new.
So I was happy, when I found information, where exactly this issue was adressed and stated, it would work:
http://jpsoft.com/forums/threads/lua-for-take-command-release-1-0.437
Unfortunately it turned out, this was kind of a plugin for a former TC-version and the examples in there do not work in TC16.
So, is there a way to call from within a .bat-file a .lua-file and let it modify some env-vars, the .bat-file-caller can evaluate?
Or how do you guys pass arguments between a .bat-file and a called script/exe-file? My workaround was to make the exe-file create a new .bat-file, in which the env-var is set (e.g. SET _TMP_ENV=abc) and call it later from within the original-.bat-file.
Thanks a lot...
Btw: I was searching for Lua within the TC-forum, but got the message
The search could not be completed because the search keywords were too short, too long, or too common.
So might be this issue was already discussed somewhere...