-- Drives Kneedeck from Lua with LuaSocket, on the same PC: DCS World (Export.lua, a hook) or any Lua. -- -- local kneedeck = dofile(lfs.writedir() .. "Scripts\kneedeck.lua") -- kneedeck.send('{"tab": "Carte LFXX", "page": 3}') -- kneedeck.send('[{"profile": "Mirage F1"}, {"action": "show"}]') -- -- A message is a JSON text: one object, or a list of them. Kneedeck listens on this PC only, on port -- 47831, and answers nothing. -- Where DCS keeps LuaSocket; elsewhere, the LuaSocket installed is found as usual. package.path = package.path .. ";.\LuaSocket\?.lua" package.cpath = package.cpath .. ";.\LuaSocket\?.dll" local socket = require("socket") local kneedeck = { port = 47831 } local udp = socket.udp() function kneedeck.send(json) udp:sendto(json, "127.0.0.1", kneedeck.port) end return kneedeck