On 2/6/07, Trevor Hopkins <[EMAIL PROTECTED]> wrote:
I have an application that I would like to parse into a menu, all of the
voices that are currently installed on a user's Mac. The user can then
select one of these voices from the menu and have Rev set the voice, check
the selected menuItem, and then uncheck all other voices in the menu.


Here is what I use:

I am assuming that you have a "Voices" menu in your menubar.
The currently selected voice is stored in a custom property called
cCurrentVoice.

Put this script into the menubar group's script:

-- list all the voices and add a checkmark to the currently selected one
--
on mouseDown
   put revSpeechVoices() into tVoiceList
   put the cCurrentVoice of this stack into tCurrent
   get lineOffset(tCurrent, tVoiceList)
   if it > 0 then put "!c" before line it of tVoiceList
   put tVoiceList into btn "Voices"
end mouseDown


Put this script into the "Voices" menu script:

-- store the new selection in the custom property
-- set Rev's voice
-- speak a sample of text
--
on menuPick pVoice
   set the cCurrentVoice of this stack to pVoice
   revSetSpeechVoice pVoice
   revSpeak "Do you like this voice?"
end menuPick

HTH,
Sarah
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to