[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] How to get ethernet addr macperl?



At 08.53 -0500 1998.12.17, Leo Wierzbowski wrote:
>Well, here is how I am doing it now.  Note that the ethernet hardware address
>is
>also known as the MAC address.  It is different than the TCP/IP address.
>I use
>DoAppleScipt and the Network Info OSAX from Carl Bell at Baylor
><http://www.baylor.edu/~Carl_Bell/>:
>
># get ethernet address
>$mac = MacPerl::DoAppleScript (<<EOS);
>  set netinfo to (network information) as list
>  set myaddr to item 1 of netinfo
>  return myaddr
>EOS
>print "The MAC address is $mac\n";
>
># get rid of the colons for my purpose
>$mac =~ s/://g;
>print "The MAC address is $mac\n";

Is there something wrong with just using this, then?  If it is a speed
issue, you might want to try converting it to Apple Events.  See macperlcat
for more info (Chris' AppleEvents Tutorial under Help, also a newer version
probably available at http://pudge.net/macperl/).

But there is nothing wrong in principle with using DoAppleScript to get the
information, if there is not a MacPerl Way to get it.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch