Things: Procrastinate

An inbox with an attractive tick on it (like the symbol for a tick, not a little beastie that latches on to your leg and gives you Legionnaire's Disease or something)Why on Earth anyone would do anything immediately is beyond me. Hence the invention of this simple little script, which will resechedule your currently selected To Dos in Things for tomorrow.

As is often the case with application scripting, a large part of the challenge is wrapping your head around the app’s unique nomenclature – every program has its own cat-skinning inclination. I spent some time trying to “move” the selected items to the “scheduled” list, to no avail. However, thanks to the excellent AppleScript documentation provided by Cultured Code (available here), I eventually figured out that they had a special verb for me: schedule.

As usual, my preferred way of running all these scripts is with Red Sweater Software’s FastScripts, and attaching a dynamic, attractive keyboard shortcut to ‘em (historians may note that for this particular script I have chosen control-right arrow. My mnemonic: get away from me).

Download Procrastinate.rb.zip.

The source code is dozing amongst those fern fronds, just over there.

#!/usr/bin/env ruby -wKU

require "rubygems"
require 'appscript'
require "date"

things = Appscript.app('Things.app')
tomorrow = DateTime.now.next_day

things.selected_to_dos.get.each { |todo| things.schedule(todo, :for => tomorrow) }
This entry was posted in things. Bookmark the permalink. Trackbacks are closed, but you can post a comment.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • What’s this all about then?

    rb-appscript is a powerful way to automate your Mac. It's similar to Applescript but it's built in Ruby, which means you get to leverage that language's powerful syntax and libraries. Giving you more time to make toasted sandwiches. You want long-winded explanations? We got those.

    Please note that these scripts are by no means bulletproof, and are intended to provide examples of application scripting. I take no resposibility for any loss of data or mishaps; you download and run everything at your own risk. That said, I use all of these scripts in a production environment every day (well – more accurately, I use some of these scripts in a production environment most days).