Have interface, need script

I’ve designed a simple test interface that is surely not unique, and I’m looking for the shortest script that will make it work. I’ve posted a picture of the interface, with more information here:

http://picasaweb.google.com/elliottbanfield/Interface91101105AM?authkey=Gv1sRgCJO-nJqIvu_1lAE&pli=1&gsessionid=4ydpO_WGepRByaJfJLMQdQ#5511961543588624626

Thanks for your attention.

Model: MacPro
AppleScript: 2.1.2
Browser: Safari 533.16
Operating System: Mac OS X (10.6)

Hi,

maybe not the shortest one, but quite fast even if you add more matrices.
The on clicked handler is connected to the Go button,
the main window is named “main”, the matrices are named “matrix1” and “matrix2”


on clicked theObject
	tell window "main"
		set row1 to current row of matrix "matrix1"
		set row2 to current row of matrix "matrix2"
	end tell
	if row2 = 1 then
		if row1 = 1 then
			log "AC"
		else
			log "BC"
		end if
	else if row2 = 2 then
		if row1 = 1 then
			log "AD"
		else
			log "BD"
		end if
	end if
end clicked


Many thanks, Stefan! I’ll check this out.