Natürlich gehts auch noch kürzer ![]()
Spoiler anzeigen
[autoit]
#include<GUIConstants.au3>
Dim $state1 = $GUI_ENABLE
Dim $state2 = $GUI_ENABLE
GUICreate("Checkboxen", 175, 150)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 10, 40)
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 10, 70)
GUISetState()
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Select
Case $msg = $Checkbox1
$state2 = BitXOR($state2, $GUI_ENABLE, $GUI_DISABLE)
GUICtrlSetState($Checkbox2, $state2)
Case $msg = $Checkbox2
$state1 = BitXOR($state1, $GUI_ENABLE, $GUI_DISABLE)
GUICtrlSetState($Checkbox1, $state1)
EndSelect
Wend