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: "Marc K. Myers" <email@hidden>
- Date: Wed, 14 Mar 2001 23:10:42 -0700
- Organization: [very little]
>
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