sd333221 Posted December 16, 2005 Share Posted December 16, 2005 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 Link to comment Share on other sites More sharing options...
is8591 Posted December 16, 2005 Share Posted December 16, 2005 Try this #include <string.au3> $Dec = 123456789 $Hex = _StringToHex($Dec, 8) Msgbox(0, "I am too stupid to calcualte", $Hex) Link to comment Share on other sites More sharing options...
Valuater Posted December 16, 2005 Share Posted December 16, 2005 (edited) reversly... this works $dec = Dec("75BCD15") MsgBox(0,"", $dec) 8) Edited December 16, 2005 by Valuater Link to comment Share on other sites More sharing options...
sd333221 Posted December 16, 2005 Author Share Posted December 16, 2005 reversly... this works $dec = Dec("75BCD15") MsgBox(0,"", $dec) 8) Yesm but i dont need it reversly lol ^^ Link to comment Share on other sites More sharing options...
BigDod Posted December 16, 2005 Share Posted December 16, 2005 $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 Link to comment Share on other sites More sharing options...
sd333221 Posted December 16, 2005 Author Share Posted December 16, 2005 $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... Link to comment Share on other sites More sharing options...
BigDod Posted December 16, 2005 Share Posted December 16, 2005 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 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 Link to comment Share on other sites More sharing options...
CyberSlug Posted December 16, 2005 Share Posted December 16, 2005 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! Link to comment Share on other sites More sharing options...
Francis Lennert (France) Posted December 16, 2005 Share Posted December 16, 2005 Hello,Not so stupide because that's _StringToxHex converts STRING to hex. AutoIt converts every char from$Dec = 1 2 3 4 5 6 7 8 9 to an Hex value...HTH,Francis Link to comment Share on other sites More sharing options...
Valuater Posted December 16, 2005 Share Posted December 16, 2005 Yesm but i dont need it reversly lol ^^ok.... i knew that... and you already had an answerjust 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 )lol8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now