Accessing Project Support Material Folders from Things with AppleScript
Although Things from CulturedCode allows you to have notes with tasks and projects, even linking files, URLs and folders to the notes, I, like maybe many of you, keep a folder on my hard disk for the so called "Support Material" for each of my projects. The script introduced in this posts allows you to open, or if it does not yet exists, create the Project Support Material folder from within Things.
Functionality of the Script
The script is invoked, using different options (see below), while you have selected one or more tasks within Things that belongs to a project (tasks without a project or assigned to an Area of Responsibility or Person will get rejected). The Script than checks within a specified folder at the top level of your "Documents" system folder, if a folder for the related Things project (using the name of the project) already exists. If it does, it'll open it in a Finder window and bring it to the front, if it doesn't exist, you'll be asked whether you want it to be created.
Installation and Configuration
- Download the AppleScript
- Put it into your user script directory, e.g. ~/Users/<your username>/Library/Scripts/
- Modify the key parameters in the script as required
- Configure your preferred way for running the script
Here are the parameters you can change to make the script working for your environment:
set projectsFolderName to "Support Material"- Change this into the folder name in which you keep all your project's support material foldersset projectsPath to (path to documents folder as text)- This points to your standard "Documents" folder by default, if you use a different folder or a folder further down in the hierarchy , you can set it to a string with the folder path, e.g. "Macintosh HD:Users:Sven:Documents:Misc:Projects:". It needs to end with a colon.
Running the Script
There are at least three different ways to invoke the script when working in Things. Unfortunately Things does not allow to e.g. add scripts to menu or tool bars, so we need to work around this with one of the following options:
- Use the Mac OS X Script menu which can be configured using the AppleScript Utility. It displays a menu bar item from which you can invoke scripts and with the Keyboard Setting in the Mac OS X System Preferences you can even assigned a keyboard short-cut for each script. The Things Wiki has a great description on how to get this working.
- Using Red Sweater's FastScripts does about the same thing, but with much more comfort since you can, for example, assign keyboard short-cuts to each script right from within FastScripts. It is pretty much the AppleScript Utility on steroids.
- Last option is to use an "Application Launcher" such as QuickSilver or Launchbar. You can simply call them using a distinct keyboard shortcut and type the name of the script or an abbreviation you have configured for it and run it.
The script is based on the work done by Jim Harrison for similar functionality in OmniFocus or TaskPaper, but I have modified and simplified the scripting significantly and made it work for Things. Let me know if the script works for you and if not which problems you encounter.