The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Today's Posts

 
AppleScript: Transfer tasks from THL (The Hit List) to OmniFocus Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
I am currently using The Hit List (used OmniFocus, but then moved to Things, and then to THL).

However, I will be getting an iPhone soon and as THL does not as of yet have an iPhone app, I wanted to move back to OF (as Things does not quite work like I want it to).

THL does not export stuff, but it does support AppleScript, so I wrote a small script that creates new tasks in the OmniFocus Inbox using the current selected tasks in THL. Here is the script just in case somebody else needs to move.

You still have to do manual work, but not as much as you would have to. It would be possible to create a script that traverses the folder and list structure of THL and replicates it in OmniFocus, but this is Good Enough™ for me.

Code:
tell application "The Hit List"
	activate
	set tasklist to selection
	set singleTask to true
	
	if tasklist is not {} then
		repeat with theTask in tasklist
			set theStart to missing value
			set theDue to missing value
			set theOmniTask to missing value
			
			set theTitle to the title of theTask
			set theNotes to the notes of theTask
			set theStart to the start date of theTask
			set theDue to the due date of theTask
			
			tell application "OmniFocus"
				tell default document
					set newTaskProps to {name:theTitle}
					if theStart is not missing value then set newTaskProps to newTaskProps & {start date:theStart}
					if theDue is not missing value then set newTaskProps to newTaskProps & {due date:theDue}
					if theNotes is not missing value then set newTaskProps to newTaskProps & {note:theNotes}
					
					set newTask to make new inbox task with properties newTaskProps
				end tell
			end tell
		end repeat
	end if
end tell
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
AppleScript that adds Waiting For emails from Mail.app (delegated tasks) to OmniFocus simplicitybliss OmniFocus Extras 139 2014-01-16 12:25 PM
How do I transfer from OmniOutliner to OmniFocus? neilcowley OmniFocus 1 for Mac 2 2008-07-29 04:43 PM
OmniFocus: Querying tasks in Applescript gives odd results RobTrew AppleScripting Omni Apps 0 2008-03-01 01:03 AM
Applescript error: reading the property list of non-inbox tasks RobTrew OmniFocus Extras 1 2008-01-13 11:33 PM
Applescript Help: getting a list of tasks tweir OmniPlan General 3 2007-01-10 02:33 PM


All times are GMT -8. The time now is 08:48 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.