<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2713.1100" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Hey, everyone: Here is what I ended up doing that not only retrieves the
MAC Address, but also solves a reported problem of being unable to quit Apple
System Profiler:</DIV>
<DIV> </DIV>
<DIV>In order to get the MAC Address from Apple System Profiler, you first need
to know that ASP refers to this as the "AppleTalk Address", and that it returns
the address in AppleScript's list format (ex: {"00.0a.27.d6.9d.06"}). Secondly,
you need to know where ASP *is*, otherwise you'll get the dreaded "Please locate
Apple System Profiler:" dialog box. I discovered that if you can let MC locate
it (through whatever means you need - directories(), files(), etc.), you need to
make sure that the default directory is set to the location of ASP, otherwise
you'll get the "Please locate:" box. </DIV>
<DIV> </DIV>
<DIV>On my Mac (and I believe most modern OS8-9 Macs), ASP is located in the
Apple Menu Items folder. So here's the script (assuming MC has found it in the
Apple Menu Items folder):</DIV>
<DIV> </DIV>
<DIV>function GetMACAddress<BR> local tResult<BR> set the directory
to specialFolderPath("apple")<BR> put "tell application" && quote
& "Apple System Profiler" & quote & cr & \</DIV>
<DIV> "get appletalk address" & cr & "end tell" into
getMACScript<BR> put "tell application" && quote & "Apple
System Profiler" & quote & cr & \</DIV>
<DIV> "close window" && quote & "Apple System
Profiler" & quote & cr & "end tell" into quitASPScript<BR>
<BR> set the directory to specialFolderPath("apple")<BR> do
getMACScript as AppleScript<BR> put the result into retVal<BR> do
quitASPScript as AppleScript<BR> replace "{" with "" in retVal<BR>
replace "}" with "" in retVal<BR> replace quote with "" in
retVal<BR> return retVal<BR>end GetMACAddress</DIV>
<DIV> </DIV>
<DIV>Note that although you can't send "quit" to ASP, you CAN say "close window
'Apple System Profiler'" and it does the same thing!</DIV>
<DIV> </DIV>
<DIV>Enjoy!</DIV>
<DIV> </DIV>
<DIV>Ken Ray<BR>Sons of Thunder Software<BR>Email: <A
href="mailto:kray@sonsothunder.com">kray@sonsothunder.com</A><BR>Web Site: <A
href="http://www.sonsothunder.com/">http://www.sonsothunder.com/</A></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=mister.x@win.be href="mailto:mister.x@win.be">MisterX</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=metacard@lists.runrev.com
href="mailto:metacard@lists.runrev.com">metacard@lists.runrev.com</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, February 21, 2002 12:07
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: Unique Macintosh
Identification</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=030000518-21022002><FONT face=Arial color=#0000ff size=2>just
get the Mac Address of the network card. It's unique for each hardware -
model/manuf. regardless!</FONT></SPAN></DIV>
<DIV><SPAN class=030000518-21022002><FONT face=Arial color=#0000ff size=2>You
could also generate a time base code coupled with that just to make sure it's
never duplicate. I've heard of some duplicate ids in Mac addresses but it's
one in a zillion.</FONT></SPAN></DIV>
<DIV><SPAN class=030000518-21022002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=030000518-21022002><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> <A
href="mailto:metacard-admin@lists.runrev.com">metacard-admin@lists.runrev.com</A>
[mailto:metacard-admin@lists.runrev.com]<B>On Behalf Of </B>Ken
Ray<BR><B>Sent:</B> Thursday, February 21, 2002 18:31<BR><B>To:</B>
metacard@lists.runrev.com<BR><B>Subject:</B> Unique Macintosh
Identification<BR><BR></FONT></DIV>
<DIV>THis is slightly off-topic, but does anyone know how to uniquely
identify a Mac? We're trying to set up a specific install that works on a
set number of machines by getting a unique ID for the machine and using it
to verify that the machine is "licensed". This doesn't have to specifically
be through MetaCard (it could be AppleScript, XCMD, gestalt selector,
etc.).</DIV>
<DIV> </DIV>
<DIV>Thanks!</DIV>
<DIV> </DIV>
<DIV>Ken Ray<BR>Sons of Thunder Software<BR>Email: <A
href="mailto:kray@sonsothunder.com">kray@sonsothunder.com</A><BR>Web Site:
<A
href="http://www.sonsothunder.com/">http://www.sonsothunder.com/</A></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>