IvanK Posted December 31, 2007 Posted December 31, 2007 How do I go about running 2 programmes at the same time via the export.lua script. Both applications (TACVIEW being one of them) run okay with their individual export.lua scripts in place. Is there a specific way/syntax in which I can merge the two separate export.lua scripts into a single script that will allow both to work simultaneously?
reaper2040 Posted October 4, 2009 Posted October 4, 2009 I have been searching for an answer to this as well and so far have found nothing. Anyone? Thanks
Azrayen Posted October 4, 2009 Posted October 4, 2009 (edited) Yes you can :) There is a way. Don't merge your file, just create specific LUA files for this or that application. Then call those specific files by a "dofile()" command at the end of the export.lua (by the way, the dofile are executed from the last to the first in the export.lua file) Attention ! Take car on how you call export.lua's functions in your specific files : If you do it "basically", it's like you're rewriting the function, therefore preventing next LUA scripts to employ it. I'm not a specialist, but you can take example on how are written the last versions of - TacviewExportFlamingCliffs.lua (Tacview) - lotatc2.lua (LotATC v2) (see at the end of file how it's done) They work together like a charm :) Cheers Az' Edited October 4, 2009 by Azrayen
reaper2040 Posted October 5, 2009 Posted October 5, 2009 Azrayen, Thanks for the info. Tacview and LotATC are indeed working together. This is very cool since they are my two preferred exports. Here's where I am having a problem: Running Touch Buddy in client/server mode where Touch Buddy sends command "GetLomacTEWS". This works fine by itself but when LotATC is also active, neither program gets their respective updates. Tacview seems to always work regardless (maybe because it is only running local?).
Azrayen Posted October 5, 2009 Posted October 5, 2009 As I said, I'm not a specialist. Just try to look in the LUA file for Touchbuddy. Try to compare LUAs from Tacview & LotATC (IIRC there is a vanilla function used by LotATC but not by Tacview : I suppose the problem could be there ?) About local / not local running : I don't know... Are you sharing ports numbers or opening sockets the same way/with the same name (overwriting ??) (I don't even know if that's possible, only making guesses here, as I never programmed anything in LUA myself ;)) ++ Az'
Azrayen Posted October 5, 2009 Posted October 5, 2009 Try to compare LUAs from Tacview & LotATC (IIRC there is a vanilla function used by LotATC but not by Tacview : I suppose the problem could be there ?) Error, there isn't. Bad remembering...
reaper2040 Posted October 5, 2009 Posted October 5, 2009 I just started messing around around with the export functions about a week ago, so I'm learning the LUA syntax as I go. Most of the export.lua files are clear enough but Tacview is a bit more complicated. Another question would be whether the conflict between TEWS and LotATC exports originates at the time of export or when my client system "asks" for the data?
Recommended Posts