Hay Leute
Wie kann ich es machen das erst ein Hacken angekreutzt werden musst damit ein Button anklickbar ist.
Wie z.B. bei einem Setup:
Siehe Anhang
Gruß Mrx
Hay Leute
Wie kann ich es machen das erst ein Hacken angekreutzt werden musst damit ein Button anklickbar ist.
Wie z.B. bei einem Setup:
Siehe Anhang
Gruß Mrx
kleines beispiel ![]()
#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 180, 68, 193, 125)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 8, 16, 17, 25)
$Button1 = GUICtrlCreateButton("Button1", 40, 8, 121, 33, 0)
GUICtrlSetState(-1, $GUI_DisABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Checkbox1
If GUICtrlRead($Checkbox1) = 1 Then
GUICtrlSetState($Button1, $GUI_ENABLE)
Else
GUICtrlSetState($Button1, $GUI_DisABLE)
EndIf
Case $Button1
msgbox(0,"","Test")
EndSwitch
WEnd
So:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 625, 443, 389, 160)
$Radio1 = GUICtrlCreateRadio("OK", 12, 24, 113, 17)
$Radio2 = GUICtrlCreateRadio("Nein", 17, 57, 113, 17)
GUICtrlSetState($Radio2, $GUI_CHECKED)
$Button1 = GUICtrlCreateButton("Weiter", 128, 276, 75, 25, 0)
GUICtrlSetState($Button1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $Radio1
If BitAND(GUICtrlRead($Radio1), $GUI_CHECKED) = $GUI_CHECKED Then
GUICtrlSetState($Button1, $GUI_ENABLE)
EndIf
Case $Radio2
If BitAND(GUICtrlRead($Radio2), $GUI_CHECKED) = $GUI_CHECKED Then
GUICtrlSetState($Button1, $GUI_DISABLE)
EndIf
Case $Button1
MsgBox(262160, "", "Weiter")
EndSwitch
WEnd