PDA

View Full Version : Get IP from computer


Chris62651
11-07-2007, 08:22 AM
I am trying to get the IP of a computer and write it to an INI file with some other options. I can't seem to get the IP.

result = System.GetLANInfo();
TextFile.WriteFromTable("C:\\MyFile.txt", result, false);

How would I just narrow down just the IP? Trying to set up INI file with this in it

server="ip"
serverport=XX
timeout=XXX

And maybe a simple way to insert all that info into a ini file. Thanks.

jassing
11-08-2007, 10:20 AM
result = System.GetLANInfo();
TextFile.WriteFromTable("C:\\MyFile.txt", result, false);

How would I just narrow down just the IP? Trying to set up INI file with this in it

And maybe a simple way to insert all that info into a ini file. Thanks.

local cIP = System.GetLANInfo().IP;
INIFile.SetValue("Test.ini","Network","IP",cIP);