Hey kids… so another late night question. I have finally figured out how trigger the change the ttiles of radio buttons with a “title” but unfortunatley, when I try the same thing using a
set title of cell 1 of matrix "location" of window "main" to contents of text field "six"
I get an applescript error:
Can't make contents of «class texF» "six" of «script» into type Unicode text. (-1700)
I have tried:
set title of cell 1 of matrix "location" of window "main" to contents of text field "six" as a string
as well as:
set title of cell 1 of matrix "location" of window "main" to contents of text field "six" as unicode text
But to no avail. Please someone, anyone! What can I do to solve this error?
It’s probably not a Unicode issue but a reference issue. You have specified the full reference of the cell in the matrix but not for the text field (you need the window and, perhaps, any other element it is in such as a box). Assuming they are in the same window, try this:
tell window "main"
set title of cell 1 of matrix "location" to contents of text field "six"
end tell
or, more precisely (and concisely):
tell window "main" to set title of cell 1 of matrix "location" to string value of text field "six"