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 > Applying OmniFocus
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Applescript for Exporting Action/Project to DEVONThink Pro Thread Tools Search this Thread Display Modes
I'm looking for a simple applescript that will export an OF action (with notes, attachments, I guess) to DEVONThink Pro. I've seen Rob Drew's scripts, but they (1) seem like using a sledge hammer for killing a fly, and (2) they don't work for me.

Are there other alternatives out there?

Jason
 
Attachments may prove hard, I think.
(The scripting support for them leaves scope for further development)
There is a helpful thread here.
 
Rob - Thanks for the reply. So attachments may prove difficult - I can do without them. I just need a simple 'OF action' to 'DTPro Inbox item' script. Your seem promising, but I just can't get them to work.

Surely, there's something more straight forward. Maybe an Automator action?
 
I've just uploaded fresh copies of the scripts (with a fix for an issue involving textless tasks in Save2DevonAsTXT).

They seem to be working fine on my system (10.6, OF 1.8, Dev Pro 2.0.3) from the OmniFocus toolbar.

Remember that you only have to select the top level folders/projects/action groups that interest you - all/any children will be exported with them.

What difficulty do you seem to be encountering ?

--

Last edited by RobTrew; 2010-08-21 at 01:43 AM..
 
Rob,

Thanks for your interest in how the scripts perform for me. The first thing I did when I saw you'd updated your scripts was to download them and try them without modification. To my great pleasure, they worked, both from inside OF and from the AppleScript editor.

Then they started started to fail. For the record, I'm running DTPro Office 2.0.3, OF 1.7.5, and OS X 10.6.4.

Here are the types of failure messages I'm getting.

The scripts do not work on any of the contents of the OF Inbox, it does not work on a "!Single Tasks" project (perhaps because of the leading '!'?). I get no error message and no script output.

I also run across this problem:
Quote:
The document “Untitled” could not be saved as “ interdisciplinary Freshman Seminar, Inquiry Seminar—Missing NA.oo3”. The file doesn’t exist.
This may be because the project title,
Quote:
"course approval: interdisciplinary Freshman Seminar, Inquiry Seminar—Missing NA"
, has a colon in it? This appears to be the cause of this problem.

These problems are minor, I guess. My initial dissatisfaction arose from the script failures on the OF Inbox.

Hope this information is interesting or helpful to you.

Jason
 
Quote:
Originally Posted by millerj View Post
This may be because the project title, , has a colon in it? This appears to be the cause of this problem
Thanks, that's helpful, and I'll take a look at it.

In the meanwhile, if you want to experiment with something very simple, you could start with a draft like this:

(Even this had to be amended to purge any colons from the file name :-)

Code:
property pstrAppSupport : (path to application support from user domain as string)

tell application id "com.omnigroup.omnifocus"
	set oWin to front document window of front document
	
	set lstObjects to value of selected trees of content of oWin
	set strText to ""
	repeat with oObject in lstObjects
		set strText to strText & "- " & name of oObject & return
		set strNote to note of oObject
		if strNote is not "" then set strText to strText & strNote & return
	end repeat
end tell

--tell application id "com.apple.finder" to set the clipboard to strText

tell application id "com.apple.TextEdit"
	set strName to first paragraph of strText
	
	-- PURGE COLONS (FILE SYSTEM SEPARATORS) FROM FILE NAME
	set my text item delimiters to ":"
	set lstParts to text items of strName
	set strName to ""
	repeat with oPart in lstParts
		set strName to strName & oPart & space
	end repeat
	set my text item delimiters to space
	
	set strName to strName & ".txt"
	set oDoc to make new document with properties {text:strText, name:strName}
	save oDoc in pstrAppSupport & "DEVONthink Pro 2:Inbox:" & strName
	close oDoc
end tell

Last edited by RobTrew; 2010-08-21 at 07:29 AM.. Reason: Code amended to purge ":" from file names
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting project + context via script (modifying a DEVONthink script) bernd OmniFocus Extras 2 2012-09-08 01:10 PM
Creating a dated OF action with links to DevonThink record(s) RobTrew OmniFocus Extras 0 2011-02-13 02:21 PM
Applescript -- Move project or action to: ??? darrenburgess OmniFocus 1 for Mac 1 2010-01-18 08:05 AM
Exporting to OPML using AppleScript atobe OmniOutliner 3 for Mac 5 2008-05-30 03:11 AM
OmniWeb Applescript Support (for DevonThink) dougray OmniWeb General 8 2006-11-03 09:21 AM


All times are GMT -8. The time now is 01:36 AM.


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