• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: applescript SAY command help needed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescript SAY command help needed


  • Subject: Re: applescript SAY command help needed
  • From: dealTek <email@hidden>
  • Date: Sat, 28 Jul 2012 19:07:20 -0700

On Jul 28, 2012, at 6:59 PM, James Yanchak wrote:

> H i Dave,
>
> Welcome to AppleScripting.
>
> Try breaking thisstuff into a list, set a count of words to say, turn it back into a string and say that.  Wrap it in a repeat to say the whole paragraph one piece at a time. For example:
>
> set x to (count of words of thisstuff) / 2 -- < this can be any value you want.
>
> set y to 1
> repeat while y is less than (count of words of thisstuff)
> 	set thisParaSay to words y through (y + x - 1) of thisstuff as Unicode text
> 	say thisParaSay
> 	set y to y + x -- < put a dialog box in after this if you want a visual stop.
> end repeat
>


THANKS SO MUCH JAMES for you help!


set y to 1
repeat while y is less than (count of words of thisstuff)
	set thisParaSay to words y through (y + x - 1) of thisstuff as Unicode text
	say thisParaSay

----> now right about here I'll need something to check for abort key pressed like :  like CMD-period… (so it says a bit then checks for abort key...)

Q: Can you enlighten me as to how to accomplish this part?


	set y to y + x -- < put a dialog box in after this if you want a visual stop.
end repeat





> This is a horrible cheat, but should give you want you want.
>
> James
>
> On Jul 28, 2012, at 4:01 PM, Dave wrote:
>
>> AS newbie ...
>>
>> Currently I don't have a way to stop this speaking in the middle - CMD
>> period does not help.
>>
>>
>> Is there a way that applescript can maybe loop and break this into
>> smaller chunks and check every 5 or 10 words if a key like CMD-period
>> is pressed and if so stop the speaking loop?
>>
>>
>> EX.
>>
>> set thisstuff to "a very large paragraph of text - bigger then this
>> example. a very large paragraph of text - bigger then this example. a
>> very large paragraph of text - bigger then this example. a very large
>> paragraph of text - bigger then this example. a very large paragraph
>> of text - bigger then this example."
>>
>> say thisstuff
>>
>> --
>> Thanks - Dave
>>
>> _______________________________________________
>> 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
>


--
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


  • Follow-Ups:
    • Re: applescript SAY command help needed
      • From: James Yanchak <email@hidden>
References: 
 >applescript SAY command help needed (From: Dave <email@hidden>)
 >Re: applescript SAY command help needed (From: James Yanchak <email@hidden>)

  • Prev by Date: Re: applescript SAY command help needed
  • Next by Date: Re: applescript SAY command help needed
  • Previous by thread: Re: applescript SAY command help needed
  • Next by thread: Re: applescript SAY command help needed
  • Index(es):
    • Date
    • Thread