Thread: AddingTags
View Single Post
This script is the same as above accept the nice stuff removed so you can just paste the output in to the search bar.

I call it SearchOmniTag.scpt

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

-- These variables always need to be here
-- Change the Variable below if you do not like my divider in to whatever you want a s a divider
set myDivider to {"__________________________________________"}

-- Leave this one alone as you want the variable empty just in case
set myTags to {""}

-- This opens a file name 
-- This is to automatically select the file comment out the block if you want to select each time
set userName to short user name of (system info)
-- My location is the destkop for easy editing, you can change it where you want it to be.
set myFilePath to "/Users/" & userName & "/Desktop"
-- This is the name Tags.txt
set myFile to ("Tags.txt")
set readThisFile to (myFilePath & "/" & myFile)
set myNames to paragraphs of (read readThisFile)
-- == STOP Comment Here ====

-- NOTE: If you want to pick the files manually, just comment out the above as detailed and
-- uncoment the line below to be able to pick the file each time.
-- set myNames to paragraphs of (read (choose file with prompt "Pick text file containing Tags"))

-- Reads the file one line at a time
repeat with nextLine in myNames
	if length of nextLine is greater than 0 then
		set myTags to (myTags & nextLine)
	end if
end repeat

-- Displays the Actual Pop Up List
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
-- Check if Cancel was pressed or the List is empty and quit
if listchoice is equal to "false" then
	return 30
	-- Otherwise Go to Town!
	set myText to (listchoice)
	set the clipboard to myText as text
end if