Re: Need to translate IP addresses from hex value to dotted > quad?
Re: Need to translate IP addresses from hex value to dotted > quad?
- Subject: Re: Need to translate IP addresses from hex value to dotted > quad?
- From: "Bryan" <email@hidden>
- Date: Fri, 16 Mar 2001 04:09:44 -0500
Get Carl Bell's application "NSLookup"
http://ackmo.baylor.edu/~bellc/files/NSLookup_1.0d.hqx
and Blake Ward's OSAX "Bits & Bytes Commands"
http://macinsearch.com/infomac/dev/osa/bits-bytes-osax.html
and use the following script
set myHexAddress to "CCEB6614"
set myaddress to decimal equivalent of myHexAddress--Bits & Bytes
tell application "NSLookup"
set myDotAddress to Address to Dot myaddress
end tell
return {myHexAddress} & myaddress & myDotAddress
Bryan Kaufman
>
> Date: Wed, 14 Mar 2001 11:27:46 -0500
>
> Subject: Re: Need to translate IP addresses from hex value to dotted
>
> quad?
>
> From: "Arthur J Knapp" <email@hidden>
>
> To: email@hidden
>
>
>
> > Subject: Need to translate IP addresses from hex value to dotted quad?
>
> > Date: Tue, 13 Mar 2001 17:01:45 -0800
>
> > From: Michelle Steiner <email@hidden>
>
>
>
> [snip]
>
> > set val to (offset of (character j of theitem) in "123456789ABCDEF")
>
> [snip]
>
>
>
> > Note: the hex alpha characters must be in upper case for this script to
>
> > work.
>
>
>
> set val to (offset of (character j of theitem) in "123456789ABCDEF")
>
> if val = 0 then
>
> set val to (offset of (character j of theitem) in "abcdef") + 9
>
> end if
>
>
>
> Arthur J. Knapp
>
>
Hey! Wait a minute! Isn't "0" still a valid hex character? Someone
>
needs to stand up for the "0"s of the world!
>
>
set val to (offset of (character j of theitem) in "0123456789ABCDEF")
>
if val = 0 then
>
set val to (offset of (character j of theitem) in "abcdef") + 9
>
else
>
set val to val - 1
>
end if
>
>
Marc K. Myers <email@hidden>
>
AppleScriptsToGo
>
4020 W.220th St.
>
Fairview Park, OH 44126
>
>
[3/14/01 11:09:14 PM]
>
--
>
http://www.AppleScriptsToGo.com
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users