• 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: Hardware Mac Address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hardware Mac Address


  • Subject: Re: Hardware Mac Address
  • From: Pete Gordon <email@hidden>
  • Date: Sat, 12 Jun 2004 08:48:12 -0400

Here's what I came up with, anybody know text manipulation (substrings)
better to improve this so that I am not just doing the 9th item
deliminated by " "? Also, couldn't get "increment by" to work so I did
P to P+1, somebody want to tell me if there is other syntax for this, I
am really new to Applescript?

tell application "System Profiler"
set SysProf to the system profile
set MAC to ""
set P to 1
set Ps to count paragraphs in SysProf
repeat until P is equal to Ps
set MAC to (paragraph P of SysProf)
if MAC contains "Ethernet Address" then
set OldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to " "
set MAC_ADDRESS to text item 9 of MAC
set AppleScript's text item delimiters to OldDelims
display dialog MAC_ADDRESS
end if
set P to P + 1
end repeat
end tell

Thanks,
Pete
_______________________________________________
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: 
 >Hardware Mac Address (From: Ronald Hofmann <email@hidden>)

  • Prev by Date: Re: Hardware Mac Address
  • Next by Date: Re: Hardware Mac Address
  • Previous by thread: Re: Hardware Mac Address
  • Next by thread: Re: Hardware Mac Address
  • Index(es):
    • Date
    • Thread