Sign in to follow this  
Followers 0
NegativeNrG

add hex together?

6 posts in this topic

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.

Share this post


Link to post
Share on other sites



hey cyberslug,

Thanks, that wwas what i was looking for.

:P


[size=20]My File Upload[/size]Register at my site and upload.

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by NegativeNrG

[size=20]My File Upload[/size]Register at my site and upload.

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by LxP

Share this post


Link to post
Share on other sites

kool thanks, just what i was looking for.

Happy Holidays.


[size=20]My File Upload[/size]Register at my site and upload.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0