#include <ButtonConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Form1", 232, 186, 192, 124)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 24, 16, 89, 25)
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 24, 48, 89, 25)
$Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 24, 88, 89, 25)
$Checkbox4 = GUICtrlCreateCheckbox("Checkbox4", 24, 128, 89, 25)
GUISetOnEvent(-3, "gui")
GUICtrlSetOnEvent($Checkbox1, "gui")
GUICtrlSetOnEvent($Checkbox2, "gui")
GUICtrlSetOnEvent($Checkbox3, "gui")
GUICtrlSetOnEvent($Checkbox4, "gui")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func gui()
Switch @GUI_CtrlId
Case -3
Exit
Case $Checkbox1 To $Checkbox2
DllCall("user32.dll","Int","CheckRadioButton","hwnd",$Form1,"Int",$Checkbox1,"Int",$Checkbox2,"Int",@GUI_CtrlId)
Case $Checkbox3 To $Checkbox4
DllCall("user32.dll","Int","CheckRadioButton","hwnd",$Form1,"Int",$Checkbox3,"Int",$Checkbox4,"Int",@GUI_CtrlId)
EndSwitch
EndFunc