Guest Halobox Posted March 19, 2005 Posted March 19, 2005 Hello i wan to make an addition between 2 input like this : $M = GUICtrlCreateInput("", 150, 40, 100, 20) $MM = GUICtrlCreateInput("", 300, 40, 100, 20) [...] $MIN = $M / $MM [...] $res = GUICtrlCreateLabel("", 150, 150, 100, 20, 0x1000) [...] Case $msg = $button ;$results = Random(1,4) ;$MIN = " " & $MIN GUICtrlSetData($res, $M) But when I click on my button, i don't have the result, (it give always the same number) Can you help me ?
Developers Jos Posted March 19, 2005 Developers Posted March 19, 2005 Hello i wan to make an addition between 2 input like this :But when I click on my button, i don't have the result, (it give always the same number)Can you help me ?<{POST_SNAPBACK}>To retrieve the specified values you need to do a GUICtrlRead() because you are now using the control HANDLES which always have the same values!!Something like: $M = GUICtrlCreateInput("", 150, 40, 100, 20) $MM = GUICtrlCreateInput("", 300, 40, 100, 20) [...] $MIN = GUICTRLRead($M) / GUICTRLRead($MM) [...] $res = GUICtrlCreateLabel("", 150, 150, 100, 20, 0x1000) [...] Case $msg = $button ;$results = Random(1,4) ;$MIN = " " & $MIN GUICtrlSetData($res, $MIN) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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