Dictate and Send Message

One of the best things about using Dictation Commands is that they’re available from within any application, and using them doesn’t require you to leave what you’re working on in order to perform a task such as sending a quick text or SMS message.

Here’s an example of an Automator dictation workflow for quickly dictating and sending a text or SMS message.

System Setup

To prepare your system to respond to user-created dictation commands, do the following:

  1. Turn on dictation in the Dictation & Speech system preference pane.
  2. Next, in the Accessibility preference pane, select the Dictation category at the very bottom of the list on the left, and click the Dictation Commands button to the right. In the forthcoming sheet, click the box next to “Enable advanced commands” and click Done.

Your computer is now ready to respond to the dictation commands you create.

IMPORTANT CAVEAT: Due to security concerns, a script cannot create and send a message to someone you haven’t messaged before. The person or persons indicated as recipients of the message must already be a buddy or the recipient|author of an existing conversation in Messages.

Create the Dictation Command

The workflow for this dictation command contains three actions, and is easy to create using the materials provided on this page.

DO THIS ►To begin, launch Automator, choose New from the File menu, and select the Dictation Command option in the workflow template sheet displayed over the new document window. A new dictation command workflow will be created.

Now that a new Dictation Command workflow has been created in Automator, add the following actions to the workflow.

 1  Dictation Command • In the text input field at the top of the workflow window, enter the text of the title for the dictation command. When this command is spoken, it will trigger the execution of this workflow.

 2  Enable Command Checkbox • Select this checkbox to activate this dictation command.

 3  Run AppleScript Action • This action will execute a simple AppleScript script for announcing that the workflow is ready to accept dictated text. Add a Run AppleScript action to the workflow, and replace its default contents with the provided script  (⬇ see below ) 

workflow

 4  Get Specified Text Action • Add the Get Specified Text action to the workflow. The text dictated into the text field of this action will be passed as the body of the created message.

 5  Show Action When Run • To enable the Get Specified Text action to receive dictation input when the workflow is run, select this checkbox in the action’s options panel (accessed by clicking the Options button at the bottom of the action view). When this option is selected, the action view will be displayed to the user when the workflow is executed. By default, it will be ready to receive dictation.

 6  Run AppleScript Action • This action will execute an AppleScript script that creates and sends the text passed to this action as the content of a new outgoing text message in Messages. Add a second Run AppleScript action to the workflow, and replace its default contents with the provided script  (⬇ see below ) 

 7  Message Recipient Handle • In the added script, replace this placeholder with the handle of the Messages recipient. The handle can be an email address or an SMS phone number.

TOP