NegativeNrG Posted December 23, 2005 Share Posted December 23, 2005 how do you add hex and hex together? for example. 7AD9 + 54DA and it would come out: CFB3 ive tried using this: $hex = 7AD9 + 54DA Msgbox(0,"Hex is",$hex) Any Ideas? [size=20]My File Upload[/size]Register at my site and upload. Link to comment Share on other sites More sharing options...
CyberSlug Posted December 23, 2005 Share Posted December 23, 2005 (edited) You must use the prefix 0x for hex in AutoIt. $hex = 0x7AD9 + 0x54DA If you want the result in hex, try Msgbox(0,"Hex is",Hex($hex, 8)) Edited December 23, 2005 by CyberSlug 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...
NegativeNrG Posted December 23, 2005 Author Share Posted December 23, 2005 hey cyberslug, Thanks, that wwas what i was looking for. [size=20]My File Upload[/size]Register at my site and upload. Link to comment Share on other sites More sharing options...
NegativeNrG Posted December 23, 2005 Author Share Posted December 23, 2005 (edited) now i have another problem, it doesnt actually add up to what im look for. i have this problem, 036A2F2C + 97A9 will output: 000097CD When on the calc(Qword,hex) Will output: 36AC6D5 #include <GUIConstants.au3> ; $Form4 = GUICreate("HEx", 498, 313, 353, 282, -1, $WS_EX_TOOLWINDOW) $Label1 = GUICtrlCreateLabel("Add", 0, 16, 28, 17) $Input1 = GUICtrlCreateInput("AInput1", 32, 16, 121, 21, -1, $WS_EX_CLIENTEDGE) $Button1 = GUICtrlCreateButton("Calculate", 360, 224, 75, 25) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $read = GUIctrlread($Input1) $hex = $read + 0x97A9 GUIctrlsetdata($Input1,hex($hex,8)) Case Else ;;;;;;; EndSelect WEnd Exit This is my script so far. Thx Edited December 23, 2005 by NegativeNrG [size=20]My File Upload[/size]Register at my site and upload. Link to comment Share on other sites More sharing options...
LxP Posted December 23, 2005 Share Posted December 23, 2005 (edited) Local $Result = 0x036A2F2C + 0x97A9 MsgBox(0x40, 'Result', Hex($Result, 8)) Edit: In the case of your script above, change this line: $Hex = Dec($Read) + 0x97A9 Edited December 23, 2005 by LxP Link to comment Share on other sites More sharing options...
NegativeNrG Posted December 23, 2005 Author Share Posted December 23, 2005 kool thanks, just what i was looking for. Happy Holidays. [size=20]My File Upload[/size]Register at my site and upload. 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