I would like to find the script to convert a Hex number to a decimal number.
I couldn't find the function in the Window Script documentation.

Actually I am trying to write an hex number into the registry, I used
Reg.Write with a REG_DWORD type; but it only takes decimal number.

Thanks.

JW

Re: Hex to Decimal by Han

Han
Fri Feb 06 01:08:02 CST 2004

You may want something like,

msgbox eval("&H" & "FFFFFFFE")

--
Pohwan Han, Microsoft MVP, ASP/ASP.Net, Korea
Have a nice day.

"John Wood" <jwood@hotmail.com> wrote in message
news:%FGUb.10761$213.4997@edtnps89...
> I would like to find the script to convert a Hex number to a decimal
number.
> I couldn't find the function in the Window Script documentation.
>
> Actually I am trying to write an hex number into the registry, I used
> Reg.Write with a REG_DWORD type; but it only takes decimal number.
>
> Thanks.
>
> JW
>
>



Re: Hex to Decimal by John

John
Fri Feb 06 08:41:28 CST 2004

Thanks. This is what I need.

"Han" <hp4444@kornet.net.korea> wrote in message
news:#JD63$H7DHA.2404@TK2MSFTNGP12.phx.gbl...
> You may want something like,
>
> msgbox eval("&H" & "FFFFFFFE")
>
> --
> Pohwan Han, Microsoft MVP, ASP/ASP.Net, Korea
> Have a nice day.
>
> "John Wood" <jwood@hotmail.com> wrote in message
> news:%FGUb.10761$213.4997@edtnps89...
> > I would like to find the script to convert a Hex number to a decimal
> number.
> > I couldn't find the function in the Window Script documentation.
> >
> > Actually I am trying to write an hex number into the registry, I used
> > Reg.Write with a REG_DWORD type; but it only takes decimal number.
> >
> > Thanks.
> >
> > JW
> >
> >
>
>



Re: Hex to Decimal by Alexander

Alexander
Fri Feb 06 08:43:59 CST 2004

am 06.02.2004 07:40 sprach John Wood dieses:
> I would like to find the script to convert a Hex number to a decimal number.
> I couldn't find the function in the Window Script documentation.
>
> Actually I am trying to write an hex number into the registry, I used
> Reg.Write with a REG_DWORD type; but it only takes decimal number.

There's nothing to convert, the script already "reads"
Hex as Integer/Long, for example:

MsgBox &H100 '-> 256

if the hex-values come as string, use CLng or Eval.
MsgBox CLng("&H100")
MsgBox Eval("&HFFFFFFFF&")


--
Gruesse, Alex