• 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: How do you display the IP Address?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you display the IP Address?


  • Subject: Re: How do you display the IP Address?
  • From: "Stockly, Ed" <email@hidden>
  • Date: Tue, 25 Aug 2009 14:03:35 -0700
  • Thread-topic: How do you display the IP Address?

Title: Re: How do you display the IP Address?
Does this work?

ES

set
macInfo to system info
set macName to computer name of macInfo
set ipAddress to do shell script "ipconfig getifaddr en0"
set
userName to long user name of macInfo
set userlocale to user locale of macInfo
set homeDirectory to home directory of macInfo
set bootvolume to boot volume of macInfo
set primaryEthernetAddress to primary Ethernet address of macInfo
set CPUtype to CPU type of macInfo
set CPUspeed to CPU speed of macInfo
set Physicalmemory to physical memory of macInfo

set
homeDirecory to home directory of macInfo
set networkInfo to do shell script "/usr/sbin/system_profiler SPNetworkDataType" -- get network info
set AppleScript's text item delimiters to {"Domain Name:"}
try (*
get rid of unavailable domain *)
   
set
macDomainName to paragraph 1 of text item 2 of networkInfo
on error
   set
macDomainName to "unknown"
end try
set
AppleScript's text item delimiters to {" "}

set
userInfo to {}
set the end of
userInfo to {"~RRD HELP DESK INFORMATION~"}
set the end of
userInfo to {"Computer Name: ", macName} as text
set the end of userInfo to {"IP Address:", ipAddress} as text
set the end of userInfo to {"Network Domain: ", macDomainName} as text
set the end of userInfo to {"User Name: ", userName} as text
set the end of userInfo to {"User Location:", userlocale} as text
set the end of userInfo to {"Home Directory:", homeDirectory} as text
set the end of userInfo to {"Boot Volume:", bootvolume} as text
set the end of userInfo to {"MAC Address:", primaryEthernetAddress} as text
set the end of userInfo to {"CPU Type:", CPUtype} as text
set the end of userInfo to {"CPU Speed:", CPUspeed} as text
set the end of userInfo to {"Memory:", Physicalmemory} as text

set
AppleScript's text item delimiters to return & return

set
user_info to userInfo as text (* required to get rid of a confusion upon 'as *)
display alert user_info

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >How do you display the IP Address? (From: email@hidden)

  • Prev by Date: How do you display the IP Address?
  • Next by Date: How do you display the IP Address?
  • Previous by thread: How do you display the IP Address?
  • Next by thread: Re: How do you display the IP Address?
  • Index(es):
    • Date
    • Thread