For ease of updating and maintenance I've collected my OmniFocus applescripts. Do with them what you will.

Happy productivity.

-Sandro ( Email Me )

Latest Releases & Updates

Applecripts:



For more useful OF applescripts, check out Curt Clifton's page

Reprocess Task to Inbox
i threw together a down and dirty applescript that brute forces this: it grabs the task name and note, creates a new task in the inbox with those two pieces of info, and then (ahem) deletes the existing task. If that deleting aspect is too scary at first, by all means comment out that line until you trust that it works for you.

A caveat and a Warning:

  1. this only works on single tasks (thanks to curt clifton for his single task test chunk of applescript)
  2. if you select a task that has children, it will only copy the parent task then delete the whole task children and all. i did say it was dirty and brute force-ish right? i'll work on the whole recursion thing asap...

Installation
Place it in your ~/Library/Scripts/Applications/OmniFocus/ directory (which then allows you to add it to your toolbar if you wish).

Current Version: 0.3 (updated 06/23/2007)

Cycle Through Task States
I find myself going to the filter to cycle through next, available and remaining pretty much all the time throughout the day, so i thought i would simplify that process by automating it and assigning it a QuickSilver hotkey. If you don't already use QuickSilver, for shame, and go download it immediately :) http://quicksilver.blacktree.com/

Installation:
Place it in your ~/Library/Scripts/Applications/OmniFocus/ directory (which then allows you to add it to your toolbar if you wish).

Usage:
At the top of the script there is variable called availableTaskStates which contains a list of available task states. Those are the states this script will cycle through. The script will cycle through them in the order in which they are listed. By default it cycles through the states by going from Next > Available > Remaining > Flagged and back to Next, but you could easily reorder them or remove some.

QuickSilver HotKey:
I also assigned it a hot key using QuickSilver (QS). Here's the QS hotkey installtion options:

  1. bring up QS using your QS hotkey, then type command-, to get to the QS preferences dialog.
  2. select triggers form the toolbar
  3. select custom triggers from the left sidebar
  4. select the little + sign at the bottom left of the preferences window and select new HotKey which will drop a dialog box
  5. navigate to the CycleTaskStates.scpt file and hit enter which will make the dialog disappear and new trigger should be in your trigger list(based on how you have QS configured the best way to get to this file would probably be to type Library then hit the right arrow which would open up the QS file browser, then browse to Scripts>Applications>OmniFocus and select the script)
  6. now select that new trigger and hit the little information "i" at the bottom right of the preferences
  7. click the settings chicklet in the new right pane that just opened up and type your new hotkey (i chose command-3 since it's available and easy)
  8. finally click the scope chicklet and then select Enabled in Selected Applications from the pulldown menu
  9. then type OmniFocus in the bottom text box
  10. that should it. you can exit the QS prefs and now go to OF and use your key command to cycle through your selected task states (as set in the script itself - see above)

Current Version: 0.3 (updated 10/11/2007)
fixed issue arising from build 92632 (or earlier) where activate applescript command no longer works

Cycle Flagged
I find myself wanting to cycle between showing all and just the flagged tasks regularly throughout the day, so i thought i would simplify that process by automating it and assigning it a QuickSilver hotkey. If you don't already use QuickSilver, for shame, and go download it immediately :) http://quicksilver.blacktree.com/

Installation:
Place the script in your ~/Library/Scripts/Applications/OmniFocus/ directory (which then allows you to add it to your toolbar if you wish).

QuickSilver HotKey:
I also assigned it a hot key using QuickSilver (QS). Here's the QS hotkey installtion options:

  1. bring up QS using your QS hotkey, then type command-, to get to the QS preferences dialog.
  2. select triggers form the toolbar
  3. select custom triggers from the left sidebar
  4. select the little + sign at the bottom left of the preferences window and select new HotKey which will drop a dialog box
  5. navigate to the CycleFlaggedStatus.scpt file and hit enter which will make the dialog disappear and new trigger should be in your trigger list(based on how you have QS configured the best way to get to this file would probably be to type Library then hit the right arrow which would open up the QS file browser, then browse to Scripts>Applications>OmniFocus and select the script)
  6. now select that new trigger and hit the little information "i" at the bottom right of the preferences
  7. click the settings chicklet in the new right pane that just opened up and type your new hotkey (i chose command-4 since it's available and easy)
  8. finally click the scope chicklet and then select Enabled in Selected Applications from the pulldown menu
  9. then type OmniFocus in the bottom text box
  10. that should do it. you can exit the QS prefs and now go to OF and use your key command to cycle through your showing flagged and all tasks

Current Version: 0.3 (updated 10/11/2007)
fixed issue arising from build 92632 (or earlier) where activate applescript command no longer works

Cycle Project States
I find myself wanting to cycle between showing active and on hold projects regularly throughout the day, so i thought i would simplify that process by automating it and assigning it a QuickSilver hotkey. If you don't already use QuickSilver, for shame, and go download it immediately :) http://quicksilver.blacktree.com/

Installation:
Place the script in your ~/Library/Scripts/Applications/OmniFocus/ directory (which then allows you to add it to your toolbar if you wish).

Usage:
At the top of the script there is variable called availableProjectStates which contains a list of available project states. Those are the states this script will cycle through. The script will cycle through them in the order in which they are listed. By default it cycles through the states by going from Active > On-Hold > Active and so on, but you could easily reorder them or add others.

QuickSilver HotKey:
I also assigned it a hot key using QuickSilver (QS). Here's the QS hotkey installtion options:

  1. bring up QS using your QS hotkey, then type command-, to get to the QS preferences dialog.
  2. select triggers form the toolbar
  3. select custom triggers from the left sidebar
  4. select the little + sign at the bottom left of the preferences window and select new HotKey which will drop a dialog box
  5. navigate to the CycleFlaggedStatus.scpt file and hit enter which will make the dialog disappear and new trigger should be in your trigger list(based on how you have QS configured the best way to get to this file would probably be to type Library then hit the right arrow which would open up the QS file browser, then browse to Scripts>Applications>OmniFocus and select the script)
  6. now select that new trigger and hit the little information "i" at the bottom right of the preferences
  7. click the settings chicklet in the new right pane that just opened up and type your new hotkey (i chose command-5 since it's available and easy)
  8. finally click the scope chicklet and then select Enabled in Selected Applications from the pulldown menu
  9. then type OmniFocus in the bottom text box
  10. that should do it. you can exit the QS prefs and now go to OF and use your key command to cycle through your showing flagged and all tasks

Current Version: 0.2 (updated 10/11/2007)
fixed issue arising from build 92632 (or earlier) where activate applescript command no longer works

Send Entourage Messages(s) to OmniFocus Inbox
Inspired by zooids' post on the OF forums regarding adding messages from Mail to your Inbox ( http://forums.omnigroup.com/showthread.php?t=3783 ), I thought I would provide those of us who use Entourage the same luxury.

This script allows you to select one or more messages and will make a new task in your inbox for each message selected using the subject of the email as the task title, and the contents of the email as that task's notes. Also, post-import, it switches you to OF, switches your view to Projects and then to your Inbox.

This script does not set context or project, but for speed and accuracy sake, I would rather do that from OF's Inbox. Note: if I am missing something re:OF and the way it displays items without those two pieces of info, please let me know and I will adjust the script as necessary.

The way I use it is when I'm out and about, I email myself tasks with the task title as its subject and content being optional. Then when i get back, select them all and hit control-I and I'm rolling...

Installation:
Place the unzipped script in your ~/Documents/Microsoft User Data/Entourage Script Menu Items/ directory

You can rename it if you wish; I put an [OF] so it sorts to the top and groups with more OF scripts as they become available.

The script currently supports importing multiple emails: just select all the emails you want to import (you can command click them to select non-sequential emails), then hit the hotkey (control-I for me).

Entourage Hotkey:
I have also assigned it a keyboard shortcut of control-I for import (which you can change by altering the last couple of characters in the filename; as always beware of conflicts)

This has been tested with Entourage 2004 on POP, IMAP and Exchange messages.

Enjoy...

Current Version: 0.3 (updated 10/11/2007)
fixed issue arising from build 92632 (or earlier) where activate applescript command no longer works

Send Entourage Task(s) to OmniFocus Inbox
This script allows you to select one or more entourage tasks and will make a new task in your inbox for each task selected using the name of the task as the task title, and the note of the task as that task's notes. Also, post-import, it switches you to OF, switches your view to Projects and then to your Inbox.

This script does not set context or project, but can set due date. In its default state it will set the due date of the new OF task to be the due date of the entourage task. To disable this, open the script file and comment the make new task line and uncomment the alternative make new task line.

Installation:
Place the unzipped script in your ~/Documents/Microsoft User Data/Entourage Script Menu Items/ directory

You can rename it if you wish; I put an [OF] so it sorts to the top and groups with more OF scripts as they become available.

The script currently supports importing multiple tasks: just select all the emails you want to import (you can command click them to select non-sequential tasks), then hit the hotkey (control-I for me).

Entourage Hotkey:
I have not assigned it a keyboard shortcut but you can add one by altering the last couple of characters in the filename: \cT would give it hotkey of control-t and so on...

This has been tested with Entourage 2004 tasks.

Enjoy...

Current Version: 0.2 (updated 10/11/2007)
fixed issue arising from build 92632 (or earlier) where activate applescript command no longer works

Send Entourage Note(s) to OmniFocus Inbox
This script allows you to select one or more entourage notes and will make a new task in your inbox for each note selected using the name of the note as the task title, and the content of the note as that task's notes. Also, post-import, it switches you to OF, switches your view to Projects and then to your Inbox.

This script does not set context, project, or due date.

Installation:
Place the unzipped script in your ~/Documents/Microsoft User Data/Entourage Script Menu Items/ directory

You can rename it if you wish; I put an [OF] so it sorts to the top and groups with more OF scripts as they become available.

Entourage Hotkey:
I have not assigned it a keyboard shortcut but you can add one by altering the last couple of characters in the filename: \cN would give it hotkey of control-n and so on...

The script currently supports importing multiple notes: just select all the emails you want to import (you can command click them to select non-sequential notes), then hit the hotkey (control-I for me).

This has been tested with Entourage 2004 notes.

Enjoy...

Current Version: 0.2 (updated 10/11/2007)
fixed issue arising from build 92632 (or earlier) where activate applescript command no longer works

Create Entourage Email from OmniFocus Task
This script allows you to select one OF task then creates a new draft email in Entourage and takes the title of the task and sets it as the subject of your new email, and takes the note of task and sets it as the content of your new message then brings entourage and that email to the front.

This script does not select sending account or set recipients.

Installation:
Place it in your ~/Library/Scripts/Applications/OmniFocus/ directory (which then allows you to add it to your toolbar if you wish).

Usage:
Invoke using a quicksilver hotkey or by clicking it from your omnifocus toolbar.

QuickSilver HotKey:
I also assigned it a hot key using QuickSilver (QS). Here's the QS hotkey installtion options:

  1. bring up QS using your QS hotkey, then type command-, to get to the QS preferences dialog.
  2. select triggers form the toolbar
  3. select custom triggers from the left sidebar
  4. select the little + sign at the bottom left of the preferences window and select new HotKey which will drop a dialog box
  5. navigate to the CreateEntourageEmailFromOFTask.scpt file and hit enter which will make the dialog disappear and new trigger should be in your trigger list(based on how you have QS configured the best way to get to this file would probably be to type Library then hit the right arrow which would open up the QS file browser, then browse to Scripts>Applications>OmniFocus and select the script)
  6. now select that new trigger and hit the little information "i" at the bottom right of the preferences
  7. click the settings chicklet in the new right pane that just opened up and type your new hotkey (i chose command-6 since it was available for me and easy)
  8. finally click the scope chicklet and then select Enabled in Selected Applications from the pulldown menu
  9. then type OmniFocus in the bottom text box
  10. that should it. you can exit the QS prefs and now go to OF and use your key command to cycle through your selected task states (as set in the script itself - see above)

This has been tested with Entourage 2004.

Enjoy...

Current Version: 0.2 (updated 09/20/2007) - fixed change in OF reference to tasks

Send Firefox Page URL to OmniFocus Inbox
This script will grab the URL and optionally the title of the current front firefox window and make a new task in your inbox. There are two flavors of this script: one which uses the url of the current page as the title of your task, and the other which uses the page title of the firefox window as the title of your new task and puts the url in the note field. Also, post-import, it switches you to OF, switches your view to Projects and then to your Inbox.

This script does not set context, project, or due date.

Installation:
Place the unzipped script in your ~/Library/Scripts/Applications/Firefox/ directory (create it if it doesn't exist; chances are it doesn't)

There are two ways of integrating and using this script and neither is the ideal solution because i have not found a way to invoke a hotkey from firefox to trigger the script (firefox's applescript support is most definitely lacking):

1. The less desirable option: Using the Script Menu item
To add the script menu to your Mac menu bar, open the file called "AppleScript Utility" in your /Applications/Applescript/ folder then enable "Show script menu in menu bar"

Now whenever you want to use the script from firefox, go to the script menu and there should be a Firefox option and the script should be visible (provided you followed the installation instructions above)

2. The more desirable option: quicksilver integration
Unfortunately, as I mentioned, applescript support in firefox is severely lacking, so the only way i have found to use the script with firefox and quicksilver is by assigning it an abbreviation then invoking quicksilver and typing in that abbreviation (note: unlike omnifocus, quicksilver triggers did not work for me in firefox)

QuickSilver Integration:

  1. bring up QS using your QS hotkey
  2. navigate to the FirefoxToOmnifocus.scpt file (based on how you have QS configured the best way to get to this file would probably be to type Library then hit the right arrow which would open up the QS file browser, then browse to Scripts>Applications>OmniFocus and select the script)
  3. once you have the script selected, tab to the action pane and type "Assign" (without the quotes) and "Assign Abbreviation" should appear and a third pane should open.
  4. tab over to the third pane and type in the abbreviation you want to assign to that script; be careful what you select as it could conflict with other applications or documents. I used ff.
  5. finally hit return and the QS dialog should disappear
  6. that should do it.
  7. to use the script, go to firefox, load a page, then invoke QS and type your abbreviation and hit enter and voila, a new task in Omnifocus. If the script does not come up as the first and default item, then hit the down arrow, click the dot next to the name of the script and set it as the default and optionally remove the default options for that abbreviation.

As stated above the two flavors of this script are:

  1. Standard: this only grabs the URL and creates a new task with the url as the task title.
  2. With Title: this grabs the page title and url, and create a new task with the page title as the task title and the url as the note.

Enjoy...

Current Version: 0.1 (updated 08/12/2007)

NOTE: If you notice that the script was working then just stopped working, chances are that it's actually Firefox that is misbehaving. There is a bug in Firefox where after a period of time other applications (like applescripts, url manager pro, et al) cannot access the url/title of the current window and tab. I haven't figured out if it's related to having too many tabs open, running firefox for too long and memory bloat kicks in, or some odd issue with one of the extensions I have installed (and I have quite a few installed), or what. Unfortunately the only fix I have found to work is to restart Firefox, which if you have Tab Mix Plus installed shouldn't be an issue (check it's session save/restore options).