I still can't use the say command

I am trying to use the say command. Here is the code i have.

on choose menu item theObject
set theName to title of popup button 1 of window “Main”
tell application “Finder”
say theName using theName
end tell
end choose menu item

the menu items it chooses and gets the names from are all the voices on the computer like fred, agnes, bruce, spelled exactly.
it gives me this error during runtime:

AppleScript Error
Finder got an error: “Agnes” doesn’t understand the «event sysottos» message. (-1708)

could anyone please help me with this situation?

Try two things:

  • Just forget the Finder. The “say” command is owned by the Standard Additions:
on whatever
     say thename using thename
  • If the first solution doesn’t help, try this code:
set thename to "Agnes"
run script "say "" & thename & "" using "" & thename & """

Thanks, the second one worked. The weird thing is I have been using the say command in different scripts and it worked like the first one. Thats why I was confused.

Perhaps the folk which compiles the script is confusing terminologies :?: