Re: Text to Speech
Re: Text to Speech
- Subject: Re: Text to Speech
- From: Paul Skinner <email@hidden>
- Date: Mon, 14 Jan 2002 17:02:25 -0500
I assume you're going to run this from OSA menu or the application's
script menu.
The trick here is getting the text of the selection from the app.
If it is possible (ie the app is scriptable and knows what
'selection' means) then just...
tell me
say ( the selection )
end tell
Unfortunately, this isn't going to be so easy. Every app does not
support the 'selection' class nor do those that do return it the same
way. And in some cases the selection could be non-textual. To get more
applications to respond appropriately you could hit command-c and then
speak the text of the clipboard of the frontmost app. This code does not
filter out styles from styled text.
tell me
say ( the clipboard )
end
In 10.x you can use services that provide this function (and in
german ect...) ! Cocoa apps only I believe.
On Monday, January 14, 2002, at 03:08 PM, henk wrote:
I'd like to write an Apple Script that would take any selected text and
speak it using Text to Speech. Does anyone know how this can be done?
Thanks
Henk
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
--
Paul Skinner