13.6 C
New York
Sunday, May 25, 2025

Automator: Error when operating a Phrase Depend service in TextEdit


I adopted a short step-by-step information for including phrase depend performance to TextEdit.

Be aware that the information instructs: "It’s going to ask you to decide on a kind in your doc; click on Service". Nonetheless, most likely on account of model variations, as an alternative one should select Fast Motion.

Automator: Error when operating a Phrase Depend service in TextEdit

Because the information advises, I used this code:

osascript inform software “TextEdit” set word_count to depend phrases of doc 1 set char_count to depend characters of doc 1 set show_words to (word_count as string) & ” phrases. (” & (char_count as string) & ” characters.)” set dialog_title to “TextEdit Phrase Depend” show dialog show_words with icon 1 with title dialog_title buttons {“Okay”} default button “Okay” finish inform AppleScriptHereDoc

After creating the Motion / Service and operating it, I get the next error:

The motion “Run Shell Script” encountered an error: “-: -c: line 0: syntax error close to surprising token `('
-: -c: line 0: `osascript inform software “TextEdit” set word_count to depend phrases of doc 1 set char_count to depend characters of doc 1 set show_words to (word_count as string) & ” phrases. (” & (char_count as string) & ” characters.)” set dialog_title to “TextEdit Phrase Depend” show dialog show_words with icon 1 with title dialog_title buttons {“Okay”} default button “Okay” finish inform AppleScriptHereDoc'”

The information is from Feb 23, 2018 (over 5 years in the past on the time of this writing), so that will have one thing to do with it. Hopefully there is a easy repair although.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles