Re: Get System Info - How
Re: Get System Info - How
- Subject: Re: Get System Info - How
- From: John Baltutis <email@hidden>
- Date: Thu, 1 Apr 2004 18:41:01 -0800
On 04/01/04, Oakley Masten wrote:
>
>
How do I get information about the system?
>
>
I have looked at the dictionary of the "Apple System Profiler"
>
and have been able to get the whole profile as a document.
>
BUT can not get individual parts.
>
>
or "ethernet address"
If you meant IP address, then the following, posted last Oct, either here
or at MacScripters, works:
WanIP()
display dialog "Your IP Address is " & result
on WanIP()
set WIP to missing value
set siteList to {"
http://checkip.dyndns.org/", "
http://whatismyip.com",
"
http://www.whatismyipaddress.com", "
http://ipid.shat.net/",
"
http://www.edpsciences.comhtbin/ipaddress", "
http://www.showmyip.com/"}
repeat with thissite in siteList
try
set WIP to item 1 of paragraphs of (do shell script "curl " &
thissite & " | tr -cs '[0-9\\.]' '\\012' | awk -F'.' 'NF==4 && $1>0 &&
$1<256 && $2<256 && $3<256 && $4<256 && !/\\.\\./'")
if WIP is not missing value then exit repeat
end try
end repeat
return WIP
end WanIP
_______________________________________________
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.