Re: Get IP Address
Re: Get IP Address
- Subject: Re: Get IP Address
- From: Clark Goble <email@hidden>
- Date: Mon, 20 Oct 2003 16:34:10 -0600
On Monday, October 20, 2003, at 03:30 PM, Ian Ferguson wrote:
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
That actually returns a few HTML tags as well.
Change line 5 to
set AppleScript's text item delimiters to "</body>"
_______________________________________________
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.