Skip to content
⌘ NSIS Forum Archive

HELP: VB hex function equivelant

8 posts

dselkirk#

HELP: VB hex function equivelant

Hey, would anyone know if its possible to duplicate the VB hex function command in nsis?

Thanks
kichik#
What exactly does this hex function do? If it converts a number to a hex string use:

IntFmt $0 "0x%X" "put number here"
dselkirk#
Returns a String representing the hexadecimal value of a number.
Example:

Dim MyHex
MyHex = Hex(5) ' Returns 5.
MyHex = Hex(10) ' Returns A.
MyHex = Hex(459) ' Returns 1CB.

*description from MS
iceman_k#
The example provided by Kichik does exactly what dselkirk asks for.
On the other hand, I am not sure if there is a function that does the reverse, i.e., take a hex value and convert it to decimal.