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 Search Today's Posts Mark Forums Read

 
Evernote and AppleScript Thread Tools Search this Thread Display Modes
Now that Evernote has released an update that plays well with AppleScript, wondering if anyone has tried their hand at crafting a script to link EN and OF together. Would love to be able to automate linking OF tasks with EN for reference materials.:)
 
Quote:
Originally Posted by ckennedy View Post
Now that Evernote has released an update that plays well with AppleScript, wondering if anyone has tried their hand at crafting a script to link EN and OF together. Would love to be able to automate linking OF tasks with EN for reference materials.:)
I wish I knew how to code. Must say that I will SO truly appreciate whomever can script 'pulling selected text from an EN note into de OF inbox with the title being the name of the selecte text'.

Here is the context. I take notes in Omni Focus and when ever I create a task (to do) with in my notes, I highlight the line and through a script, send it to OF's inbox. As I am looking to migrate into EverNote, when I highlight a line of text within a note, and clipp-it with Clip-o-tron, the subject is always the same for all texts (something laong the lines of Evernote Note...). So I have to edit the title before I process the task.

I assume this should be very easy? Anyone with this need willing to code it? Thanks so much...
 
The OmniFocus clipping service handles this just fine. Grabs the title of the note, plus the beginning of the text, into the quick-entry window. Super easy.
 
My issue, is that the subject of the note, is not the highlighted text, thus if I clip 5 notes from the same notes (for example 5 action items I took), they all have the same description in OF, and only by reading the notes I can distinguish them. Any way to fox this changing the script? Please see attached file. Thanks so much for your help.
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2010-11-15 at 7.33.23 PM.png
Views:	492
Size:	36.3 KB
ID:	1659  
 
Sorry for the confusion here - the clip-o-tron offers makes the best guess it can about what the title of the action should be, but it also selects the text so you can easily type in something else if you'd prefer a different name.
 
Quote:
Originally Posted by Tinchohs View Post
My issue, is that the subject of the note, is not the highlighted text, thus if I clip 5 notes from the same notes (for example 5 action items I took), they all have the same description in OF, and only by reading the notes I can distinguish them. Any way to fox this changing the script? Please see attached file. Thanks so much for your help.
Am I correct in thinking that you want to select a bunch of items, and have them clipped and turned into several individual items as one operation?
 
Quote:
Originally Posted by whpalmer4 View Post
Am I correct in thinking that you want to select a bunch of items, and have them clipped and turned into several individual items as one operation?
You are correct. This works great from Omni Outliner. But as I use more and more Evernote, I want to be able to highlight all my actions items and turn them into individual tasks in my inbox. If they all have the same name, I have to re-type in each the content that it's in the notes. If it's one it's not big deal, but when you have 10 or 15 actions and this happens several times a day, it no longer works as a solution.

Thanks.
 
Quote:
Originally Posted by Tinchohs View Post
You are correct. This works great from Omni Outliner. But as I use more and more Evernote, I want to be able to highlight all my actions items and turn them into individual tasks in my inbox. If they all have the same name, I have to re-type in each the content that it's in the notes. If it's one it's not big deal, but when you have 10 or 15 actions and this happens several times a day, it no longer works as a solution.

Thanks.
I would like to see better Evernote and Omnifocus integration.
 
A very rough first draft of a script to import the notes selected in the Evernote OS X application GUI to a series of OmniFocus tasks, either in the Inbox, or in a date-stamped import folder.

(In this draft the notes come across as plain text. It's easy enough to get a formatted RTF version into the clipboard, but I haven't spent enough time on it to detect an obvious route from the clipboard into the rich text of the OF note).

[I don't use Evernote, so this draft is offered out of curiosity, as a rough suggestion, but may not be much supported or developed]

Code:
-- Ver 0.2

-- Rough draft of a script to import selected EverNote notes to OF

-- If the following property is set to false, a date-stamped import folder is created
-- containing a project (named after the relevant Evernote notebook) which in turn contains the selected items

-- If it is set to true, the imported items will be placed in the OF Inbox

property pblnToInBox : false

on run
	set lstEv to EvNoteSeln()
	PlaceInOF(lstEv)
end run

on EvNoteSeln()
	tell application id "com.evernote.Evernote"
		set lstSeln to selection
		if length of lstSeln > 0 then
			
			tell front notebook
				set lstEv to {its name}
				repeat with oNote in lstSeln
					tell note id (local id of oNote)
						set end of lstEv to {title, HTML content}
					end tell
				end repeat
			end tell
			return lstEv
		end if
		{}
	end tell
end EvNoteSeln

on PlaceInOF(lstEv)
	
	set lngNotes to length of lstEv
	if lngNotes > 1 then
		set dte to current date
		
		tell application id "com.omnigroup.omnifocus"
			tell front document
				if pblnToInBox then
					
					repeat with i from 1 to lngNotes
						set {strTitle, strHTML} to item i of lstEv
						set the clipboard to strHTML
						set strTxt to my GetText()
						set oTask to make new inbox task with properties {name:strTitle, note:strTxt}
					end repeat
				else
					
					set oFolder to make new folder with properties {name:"Evernote Import " & dte as string}
					tell oFolder
						set oProj to make new project with properties {name:first item of lstEv}
					end tell
					tell oProj
						repeat with i from 2 to lngNotes
							set {strTitle, strHTML} to item i of lstEv
							
							set the clipboard to strHTML
							set strTxt to my GetText()
							set oTask to make new task with properties {name:strTitle, note:strTxt}
						end repeat
					end tell
				end if
			end tell
		end tell
	end if
end PlaceInOF

on GetText()
	(do shell script "pbpaste | textutil -format html -convert txt -stdin -stdout") & return
end GetText

Last edited by RobTrew; 2010-11-27 at 02:18 AM.. Reason: Restored code
 
Rob, thanks so much. I tested it and have the following question. Would it be very hard to make the script just copy the highlighted text within the note, and place it as the OmniFocus task name? That would really do it for me. Thanks so much for your help.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Omnifocus with Evernote ciwa OmniFocus 1 for Mac 95 2013-10-22 12:59 PM
Send OF item to EverNote (AppleScript exist?) ende OmniFocus 1 for Mac 0 2011-11-08 10:10 AM
Mailing outline to Evernote drfrot OmniOutliner for iPad 2 2011-06-21 02:49 PM
Support for Evernote rbl OmniWeb Feature Requests 8 2010-10-26 03:43 PM
OmniFocus and Evernote ToddPeperkorn Applying OmniFocus 1 2009-10-09 03:55 PM


All times are GMT -8. The time now is 08:19 AM.


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