using checkboxes?

i was wondering how to use a checkbox (get the state of it, set the state of it) except i counldnt find how to do that. Can anyone help??

(* Get the state *)
set theState to state of button "theButton" of window "theWindow"
--> Returns either 0 (false) or 1 (true)

(* Set the state *)
set state of button "theButton" of window "theWindow" to 1
--> Sets it to true/checked

j