Jump to content
Sign in to follow this  

Help with Inputs

Recommended Posts

I need help

i want to add a feature to my program that will read hex from an input (here First) and using another input (here Difference) to calculate the hex in the first input to the second input using the difference.

like: i type in difference 0x97A9 and in first input 10 then the second input should show 000097B9 when i click on calc

now: if i change the difference to another hexvalue and click again on calc it wont calculate that with the hexvalue i just typed

here the example code:

#include <GUIConstants.au3>
$Form1 = GUICreate("Test", 176, 97, 192, 125)
$Input1 = GUICtrlCreateInput("", 8, 24, 73, 21, -1, $WS_EX_CLIENTEDGE)
$Input2 = GUICtrlCreateInput("", 8, 64, 73, 21, -1, $WS_EX_CLIENTEDGE)
$Input3 = GUICtrlCreateInput("", 104, 24, 65, 21, -1, $WS_EX_CLIENTEDGE)
$Button1 = GUICtrlCreateButton("Calc", 104, 64, 65, 21, -1 , $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("First", 8, 8, 23, 17)
GUICtrlCreateLabel("Second", 8, 48, 41, 17)
GUICtrlCreateLabel("Difference", 104, 8, 53, 17)
While 1
    $msg = GuiGetMsg()
    Case $msg = $GUI_EVENT_CLOSE
    Case $msg = $Button1
    $read = GUIctrlread($Input1) 
    $hex = Dec($read) + $Input3
    Case Else

this may sound very n00bish but i really cant get that to work

i would like if someone of you can help me

Edited by xXx

Share this post

Link to post
Share on other sites

i knew i forgot something... thx for your fast help

Edited by xXx

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...