Thread: AddingTags
View Single Post
So the one thing that was really annoying me about OmniFocus was the inability to tag my projects. As I posted in another forum I am not using tags to supplement the GTD workflow, instead I'm using it only for reference for easy searching.

With the OmniFocus search feature you could search for every word in the notes field. Unfortunately this would also search within attached emails, webpages, etc. So instead I came up with a system that would search for my keywords as I call them "tags".

To do that I created this AppleScript to easily pick my keywords from a file and put them into the clipboard for easy pasting into OmniFocus.

My file contains keywords with various formats that I could easily use for searches. Here are some examples:

*** Heading ***

The file has to be set up with one of these per line. So that it looks good you also want to insert a space before the "tag" and a comma after the tag.

The applescript will just read a selectable file display a multi select function and add it to the clipboard so you can easily paste it in to any selection. This script will not limit you to OmniFocus only but will let you use this functions with any programs.

Hope this helped you like it helped me, and if you find it useful have any suggestions etc just post here.

-- Script To Populate OmniFocus Tags
-- Written by Yury German <yury (at)>
-- Version: 1.00
-- Date of Change: 2013-07-10

set myDivider to {"__________________________________________"}
set myTags to {""}

-- This opens a file name 
-- I will have another script that will just open up a file location as it might be easier
set myNames to paragraphs of (read (choose file with prompt "Pick text file containing Tags"))
repeat with nextLine in myNames
	if length of nextLine is greater than 0 then
		set myTags to (myTags & nextLine)
	end if
end repeat

choose from list myTags with title "Tags" with prompt "Choose One or Multiple Tags" OK button name "Insert" with multiple selections allowed
set listchoice to result as text
set myText to (return & myDivider & return & return & "*** Tags: ***" & return & listchoice & return & myDivider & return)
--set oldClipboard to the clipboard
set the clipboard to myText as text