Hola a todos.
resulta que quiero que un botón se habilite al chequear un radio y se desabilite al deschequearlo.  logro hacer que el botón se habilite al chequear el radio, pero de allí el botón se queda habilitado aún cuando deschequee  el radio. que estoy haciendo mal?. copio el código:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 447, 192, 114)
$Input1 = GUICtrlCreateInput("", 10, 16, 121, 21)
$Radio1 = GUICtrlCreateRadio("Imagen", 10, 56, 113, 17)
guictrlsetstate ($radio1, $gui_checked)
$Radio2 = GUICtrlCreateRadio("Abrir archivo", 10, 80, 113, 17)
guictrlsetstate ($radio1, $gui_checked)
$Button1 = GUICtrlCreateButton("Explorar", 10, 104, 75, 25)
guictrlsetstate($button1, $gui_disable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
case $radio2
$readradio2 = guictrlread ($radio2) 
if $readradio2 ==  $gui_checked then 
guictrlsetstate ($button1, $gui_enable)
endif	
if $readradio2 = $gui_unchecked then
guictrlsetstate ($button1, $guidisable)
endif
EndSwitch
WEnd
			
			
									
						
										
						Habilitar un botón al chequear un radio
Re: Habilitar un botón al chequear un radio
Hola, el problema esta en que para desactivar el botón lo haces en el case del radio2, si lo haces cuando se chequea el radio1 si te funcionara, asi:
Saludos...
			
			
									
						
										
						Código: Seleccionar todo
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 447, 192, 114)
$Input1 = GUICtrlCreateInput("", 10, 16, 121, 21)
$Radio1 = GUICtrlCreateRadio("Imagen", 10, 56, 113, 17)
GUICtrlSetState($Radio1, $gui_checked)
$Radio2 = GUICtrlCreateRadio("Abrir archivo", 10, 80, 113, 17)
GUICtrlSetState($Radio1, $gui_checked)
$Button1 = GUICtrlCreateButton("Explorar", 10, 104, 75, 25)
GUICtrlSetState($Button1, $gui_disable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Radio2
			$readradio2 = GUICtrlRead($Radio2)
			If $readradio2 == $gui_checked Then
				GUICtrlSetState($Button1, $gui_enable)
			EndIf
		case $Radio1
			$readradio2 = GUICtrlRead($Radio2)
			If $readradio2 = $gui_unchecked Then
				GUICtrlSetState($Button1, $gui_disable)
			EndIf
	EndSwitch
WEndRe: Habilitar un botón al chequear un radio
aaa!  perfecto. ahora entiendo el error, funciona correctamente. 
muchas gracias. un saludo.
			
			
									
						
										
						muchas gracias. un saludo.