10.7: Create a 'New To Do' Service

Dec 01, '11 07:30:00AM

Contributed by: ceej

Make it easier to create To Do items for iCal's Reminders list by creating a Service that can be invoked from the contextual menu or a keyboard shortcut.

Here's the procedure:

If you want to be able to invoke the command with a keyboard shortcut, go to System Preferences » Keyboard » Services » Text » New To Do and double-click in the invisible column to the right of the text. (Look for other keyboard shortcut listings if you can't figure out where to click. The list is divided into two invisible columns and if you don't double-click far enough to the right, nothing will happen.)

Advanced Notes: There are a few things that aren't immediately obvious about creating this Automator workflow that might be useful if you create others. It took me quite a bit of trial and error to figure these things out, so let me share them with you.

Most of you probably understand that creating this workflow as a Service allows it to show up in the contextual menu, the Services menu, and to be assigned a keyboard shortcut in the Keyboard System Preferences. Simply adding the New To Do Item action will create a new To Do item in iCal's Reminders list using the selected text as the title, but you won't be able to set any other options and you won't receive feedback that anything has happened. Selecting the option Show this action when the workflow runs presents the dialog box that allows you to set options for your new To Do item. When you create the Service, you can set what the default options should be and these defaults can always be changed by re-editing the workflow document in Automator.

The tricky part is figuring out how to make the title editable. With only the New To Do Item action, the title field in the resulting dialog is blank, but editing the field has no effect on the reminder that is created. This was very perplexing. By adding the Set Value of Variable action and placing that variable in the title field of the New To Do Item action, the selected text appears in the title field of the To Do item. However, editing the text in this field in the dialog box still has no affect.

The New To Do Item action is designed to always use the selected text as the title of the To Do item, no matter what you do in the dialog box. By selecting the Ignore this action's input option and using a variable to fill in the title filed using the selected text, you can then edit the title field as you are creating the new To Do item. This was the key to achieving the desired behavior.

I hope you find this Service useful, and I hope these technical tips help you create other useful Automator workflows.

[crarko adds: I tested most of this and it worked as described. It's a pretty straightforward Automator Service. The hint was a bit difficult to edit, so if any errors were introduced let me know in a comment and I'll correct them.]

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2011073013391927