Re: Get IP Address
Re: Get IP Address
- Subject: Re: Get IP Address
- From: Joshua See <email@hidden>
- Date: Wed, 22 Oct 2003 08:21:05 -0500
On Monday, October 20, 2003, at 04:30 PM, Ian Ferguson wrote:
You can try this:
set TheResult to (do shell script "curl -f http://checkip.dyndns.org")
set Olddelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to "Current IP Address: "
set LongIP to item 2 of every text item of TheResult
set AppleScript's text item delimiters to return
set MyIP to item 1 of (every text item of LongIP)
display dialog "Your IP is : " default answer (MyIP) with icon note
set AppleScript's text item delimiters to Olddelim
I could use one of Rube Goldberg's alarm clocks to wake up in the
morning, but I've got something from Philco instead.
If you're just trying to get your current IP how about:
tell application "Apple System Profiler" to TCPIP address
or in X:
do shell script "ifconfig | grep 'broad' | cut -d' ' -f2"
Both of these should be able to work through tell machine blocks if you
want the goods on a remote user.
On Oct 20, 2003, at 4:59 PM, Ben Gummer wrote:
Hi all,
Does anyone know how to find a users IP address through Applescript?
Any help would be great
--
Sincerely,
Joshua See
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.