xXx Posted June 25, 2006 Share Posted June 25, 2006 (edited) 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) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $read = GUIctrlread($Input1) $hex = Dec($read) + $Input3 GUIctrlsetdata($Input2,hex($hex,8)) Case Else ;;;;;;; EndSelect WEnd Exit this may sound very n00bish but i really cant get that to work i would like if someone of you can help me Edited June 25, 2006 by xXx Link to comment Share on other sites More sharing options...
GaryFrost Posted June 25, 2006 Share Posted June 25, 2006 forgetting a GuiCtrlRead of $Input3? SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
xXx Posted June 25, 2006 Author Share Posted June 25, 2006 (edited) i knew i forgot something... thx for your fast help Edited June 25, 2006 by xXx 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