How do I tell a button (image below) to check whether...

What do I have to write to tell a button (image below) to check whether:
the
switch and the radio buttons and are selected
and which item is selected from the popup button

(I need just the structure - the specific item names (eg: Radio1, Radio2, Item1) are not relevant because the image is only a sample of what I want to do)

Thanx Vince

Below is the clicked handler I would attach to the “Button” in your sample window. This code assumes that you’ve named the objects the same as I have. Make sure to provide an AS name for every sub-object of the parent objects (i.e. the cells of the matrix and the menu items of the popup button) or you’ll get an error when it tries to get the name of an unnamed item. Otherwise, this will show you how to read values from each type of item and perform a basic test to evaluate their state.

on clicked theObject
	if name of theObject is "theMainButton" then
		tell window "theWindow"
			set thePopupButtonItem to name of current menu item of popup button "thePopupButton"
			set theMatrixItem to name of current cell of matrix "theMatrix"
			set theCheckboxState to state of button "theCheckbox" --> A checkbox can have state of 0 or 1
		end tell
		
		(* Evaluate the results - Example *)
		if (thePopupButtonItem is "Item2") and (theMatrixItem is "Item1") and (theCheckboxState is 1) then
			display dialog "You're my hero!!"
		else
			display dialog "You're a dunce!!"
		end if
	end if
end clicked

j

Thank u very much!

Vince

Ps:
I promise there will be much more questions while workin’ at my first AS project beeing a newbie :lol: