• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get IP Address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Get IP Address (From: Ian Ferguson <email@hidden>)

  • Prev by Date: Re: Get IP Address
  • Next by Date: do shell script
  • Previous by thread: Re: Get IP Address
  • Next by thread: Re: Get IP Address
  • Index(es):
    • Date
    • Thread