Jump to content

Recommended Posts

Posted

Autoit:

#include <string.au3>
$Dec = 123456789
$Hex = _StringToHex($Dec)
Msgbox(0, "I am too stupid to calcualte", $Hex)

Windows Calcualtor:

123456789 >> 75BCD15

Output Autoit:

313233343536373839

Output Windows Calculator:

75BCD15

:P

Posted

$result = Hex(123456789)
MsgBox(0,"",$result)

This is what should be used to get the hex value of a number.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Posted

$result = Hex(123456789)
MsgBox(0,"",$result)

This is what should be used to get the hex value of a number.

Uhmm thx,

are you the coder of autoit? ^^^^

You know it very well!

Nice...

Posted

Uhmm thx,

are you the coder of autoit? ^^^^

You know it very well!

Nice...

No I can just read the help file and know the difference between numbers and strings :P


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Posted

Here's a revised function if you want:

$Dec = 123456789
$Hex = _revisedStringToHex($Dec)
Msgbox(0, "I am too stupid to calcualte", $Hex)

Func _revisedStringToHex($Dec)
    If $Dec < 16 Then
        Return Hex($Dec,1)
    Else
        Return _revisedStringToHex($Dec/16) & _revisedStringToHex(Mod($Dec,16))
    EndIf
EndFunc
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted

Yesm but i dont need it reversly lol ^^

ok.... i knew that... and you already had an answer

just a way of checking... i always try to check my results reversly... i "was" great at math ... just slow due to checking like this

... still am slow too!.. ( just slower )

lol

8)

NEWHeader1.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...