I'm glad it works. :) Anyone else can use it too, so long as you have Talking 
Dashboard:
https://dl.dropboxusercontent.com/u/17005121/talking%20dashboard.zip

Again, this script will be in the next update to that, but it will work right 
now if you paste the code into Script Editor and save the file in the same 
folder as the other Talking Dashboard scripts.
> On Mar 27, 2015, at 10:55 PM, Jamie Pauls <[email protected]> wrote:
> 
> Hi, Alex,
> 
> This script works like a charm. Thanks a million.
> 
> Take care and have a great day.
> Jamie Pauls
> [email protected] <mailto:[email protected]>
> 
> 
> 
>> On Mar 27, 2015, at 7:10 PM, Alex Hall <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> (* Keywords:
>> $wordCount: the number of words in the currently open document in TextEdit
>> $characterCount: the number of characters in the currently open TextEdit 
>> document
>> $name: the name of the currently open document
>> *)
>> 
>> set template to "$wordCount words ($characterCount characters) in $name."
>> set utilities to import("utilities.scpt")
>> 
>> set {wordCount, characterCount, documentName} to {0, 0, ""}
>> 
>> tell application "TextEdit"
>>      set my wordCount to count (words of document 1)
>>      set my characterCount to count (characters of document 1)
>>      set my documentName to name of document 1
>> end tell
>> 
>> set keywords to {{"$wordCount", wordCount}, {"$characterCount", 
>> characterCount}, {"$name", documentName}}
>> set template to str_replace(keywords, template) of utilities
>> tell utilities to speak(template)
>> 
>> on import(filename)
>>      set p to (path to me) as text
>>      set oldDelimiters to text item delimiters of AppleScript
>>      set AppleScript's text item delimiters to ":"
>>      set scpt to load script file (((text items 1 through ((length of (text 
>> items of p)) - 1) of p) & filename) as text)
>>      set text item delimiters of AppleScript to oldDelimiters
>>      return scpt
>> end import
>> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "MacVisionaries" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/macvisionaries 
> <http://groups.google.com/group/macvisionaries>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.


--
Have a great day,
Alex Hall
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/macvisionaries.
For more options, visit https://groups.google.com/d/optout.

Reply via email to