Re: Hardware Mac Address
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.