Obtain IP address of Logic Machine - 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: Obtain IP address of Logic Machine (/showthread.php?tid=1135) |
Obtain IP address of Logic Machine - baggins - 14.12.2017 Hi, In some of my scripts it would be useful to know the IP address of the Logic Machine on which they run. Now I use something I found somewhere: Code: require('socket') I don't know how it works, but it works (and does not require a connection to the IP address in the script. As a matter of fact that IP address is irrelevant). Is there a more elegant solution? Thanks RE: Obtain IP address of Logic Machine - admin - 15.12.2017 Code: require('ifinfo') RE: Obtain IP address of Logic Machine - baggins - 15.12.2017 (15.12.2017, 07:10)admin Wrote: Thanks, very neat! Now where can one find documentation on this kind of stuff? RE: Obtain IP address of Logic Machine - admin - 15.12.2017 This is an internal library used by system config, so it's not documented. Our documentation is available at http://openrb.com/docs/ RE: Obtain IP address of Logic Machine - baggins - 15.12.2017 (15.12.2017, 10:45)admin Wrote: This is an internal library used by system config, so it's not documented. Our documentation is available at http://openrb.com/docs/ Thanks. |