Re: applescript SAY command help needed
Re: applescript SAY command help needed
- Subject: Re: applescript SAY command help needed
- From: dealTek <email@hidden>
- Date: Tue, 18 Sep 2012 10:33:04 -0700
On Sep 18, 2012, at 10:01 AM, Dave wrote:
> Thanks so much Chris,
>
> Sorry for the delay getting back to you. The code you wrote below
> WORKS EXACTLY AS I HAD HOPED!!!! This really helps a lot!
UPDATE:
So I added the code inside filemaker and it works just right.
I tried adding this code below to an applescript step in quickeys but it would not stop with CMD-PERIOD. (Maybe not running in foreground as you mentioned?)
Any Ideas how to get it working here also? :
try
say "[[rate 250]]" & (the clipboard)
on error number -128
say "" with stopping current speech
end try
>
> Much appreciated - dave
>
>
> On Wed, Aug 8, 2012 at 5:02 AM, Chris Page <email@hidden> wrote:
>> On Jul 28, 2012, at 1:01 PM, Dave <email@hidden> wrote:
>>
>> Currently I don't have a way to stop this speaking in the middle - CMD
>> period does not help.
>>
>>
>> You can interrupt the "say" command with Command-Period when the script is
>> running in the foreground (on the main thread).
>>
>> By default, when you run scripts inside Script Editor they're run in the
>> background so you can continue to interact with Script Editor while scripts
>> are running—and you can run multiple scripts simultaneously. To force Script
>> Editor to run scripts in the foreground, press the Control modifier key so
>> the Script > Run command becomes Run in Foreground.
>>
>> Note that Script Editor is primarily intended as a development environment
>> rather than the normal way to run scripts once they're written and tested.
>> You should typically either save scripts as applications or invoke them from
>> the system Script menu (or similar mechanisms). When run that way, they are
>> run in the foreground and Command-Period will interrupt scripts on a more
>> fine-grained basis.
>>
>> Also note that even if you interrupt the "say" command, the speech itself
>> continues, since speech synthesis is performed in another process while the
>> "say" command waits for it to complete. Interrupting "say" just stops it
>> waiting for the speech to finish. If you want to explicitly stop the speech
>> in response to Command-Period, catch the "user canceled" error (-128)
>> produced by Command-Period and then tell "say" to stop any current speech:
>>
>> try
>> say "A long speech message that you can stop midway through."
>> on error number -128
>> say "" with stopping current speech
>> end try
>>
>> --
>> Chris Page
>>
>> The other, other AppleScript Chris
>>
>
>
>
> --
> Thanks - Dave
--
Thanks,
Dave - DealTek
email@hidden
[db-12]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden