all the names are right, the window is not the main window that opens on awake from nib, its opend with a button on the main menu if that matters
on clicked theObject
set theNum to 0 as number
if state of button "hi" of window "not_main" = 1 then set theNum to (theNum + 1)
if state of button "awesome" of window "not_main" = 1 then set theNum to (theNum + 2)
if state of button "almost middle" of window "not_main" = 1 then set theNum to (theNum + 4)
if state of button "middle" of window "not_main" = 1 then set theNum to (theNum + 8)
if state of button "past middle" of window = 1 then set theNum to (theNum + 16)
if state of button "almost done" of window "not_main" = 1 then set theNum to (theNum + 32)
if state of button "bye" of window "not_main" = 1 then set theNum to (theNum + 64)
set content of text field "answer" of window "second" to "" & theNum & ""
end clicked
:cough: sorry for bugging you…
whild your here (if you still are)
try this
on clicked theObject
set content of text field "answer" of window "not_main" to ""
set state of button "hi" of window "not_main" to 0
set state of button "awesome" of window "not_main" to 0
set state of button "not middle" of window "not_main" to 0
set state of button "middle" of window "not_main" to 0
set state of button "past middle" of window "not_main" to 0
set state of button "almost done" of window "not_main" to 0
set state of button "bye" of window "not_main" to 0
end clicked