Hi,
I have a script Mark shared that lets me grab the IP address for the local computer, it works well and grabs the first IP, usually the ethernet connection on the desktop macs, and the airport on the laptops.
However I have a few Macs that have both an ethernet and airport connection enabled and need to be able to get both IP addresses as im interested in communication over the airport/wifi network. Any ideas?
Thanks
Andy
Marks original script was...
function getLocalIPAddress
put "255.255.255.255:44444" into mySock
open datagram socket to mySock
put hostAddress(mySock) into myIP1
close socket mySock
return myIP1
end getLocalIPAddress
Obtaining ALL local IP addresses for machine
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Obtaining ALL local IP addresses for machine
Hi Andy,
Use shell("ifconfig -a") and write a script that finds all ip address in the output of this shell command.
Best,
Mark
Use shell("ifconfig -a") and write a script that finds all ip address in the output of this shell command.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 66
- Joined: Fri Feb 05, 2010 7:31 pm
Re: Obtaining ALL local IP addresses for machine
I think on windowsXP you need to use the command "ipconfig /all"
Cheers
Martin
Cheers
Martin
Re: Obtaining ALL local IP addresses for machine
Thanks!
Andy
Andy
Re: Obtaining ALL local IP addresses for machine
Hi,
ipconfig /all returns a system language specific result;
English: "Physical Address"
French: "Adresse physique"
Is there a way to change my cmd line language so that I can test the different languages I need?
THX,
Simon
ipconfig /all returns a system language specific result;
English: "Physical Address"
French: "Adresse physique"
Is there a way to change my cmd line language so that I can test the different languages I need?
THX,
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!