Here is the test code..
If I click the 2nd text field,I hope the 2nd radio will be selected at the same time...No need to select the radio again after I click the text field...
Thanks so much..
[ autoit ]
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $myForm = GUICreate("", 308, 154, 441, 261) $R1 = GUICtrlCreateRadio("CHOOSE1", 32, 24, 113, 17) GUICtrlSetState($R1, $GUI_CHECKED) $R2 = GUICtrlCreateRadio("CHOOSE2", 32, 80, 113, 17) $I1 = GUICtrlCreateInput("", 152, 24, 121, 21) $I2 = GUICtrlCreateInput("", 152, 80, 121, 21) $b1 = GUICtrlCreateButton("Start", 120, 120, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $b1 If GUICtrlRead($R1) = $GUI_CHECKED Then MsgBox("", "Tip", GUICtrlRead($I1)) ElseIf GUICtrlRead($R2) = $GUI_CHECKED Then MsgBox("", "Tip", GUICtrlRead($I2)) EndIf EndSwitch WEnd
If I click the 2nd text field,I hope the 2nd radio will be selected at the same time...No need to select the radio again after I click the text field...
Thanks so much..
![:rambo:](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/rambo.gif)