Download lat&long from LM - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Download lat&long from LM (/showthread.php?tid=997) |
Download lat&long from LM - buuuudzik - 18.09.2017 Hello, is it possible to download the latitude and longitude from LM in lua to use it in apps? RE: Download lat&long from LM - admin - 18.09.2017 These variables can be nil if no latitude/longitude is set: Code: <? RE: Download lat&long from LM - buuuudzik - 18.09.2017 I've tried to use it in Resident script (of course without <?) but it returns below error: Resident script:2: attempt to call global 'getconfig' (a nil value) stack traceback: I've used your solution and now I send get request to .lp file but interesting thing is that I must fill also login and password when I try to connect localhost(this is from demo machine): Code: http = require "socket.http" RE: Download lat&long from LM - admin - 20.09.2017 From scripts you can use: Code: require('uci') RE: Download lat&long from LM - buuuudzik - 20.09.2017 For sure this is much more easier solution, and last solution was little complicated. Is this also for deamon scripts? RE: Download lat&long from LM - admin - 20.09.2017 This will work anywhere, in apps as well. |