Quote:
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?
|
Thanks.
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!
|
|
FAQ | Members List | Calendar | Today's Posts | Search |
Evernote and AppleScript | Thread Tools | Search this Thread | Display Modes |
|
Member
2010-11-16, 02:47 AM
Quote:
Thanks.
Post 1
|
Member
2010-11-16, 09:29 AM
Quote:
Post 2
|
Guest
2010-11-18, 06:15 PM
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
Post 3
|
Member
2010-11-19, 09:34 AM
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.
Post 4
|
Guest
2010-11-19, 09:43 AM
The Evernote applescript library doesn't give access to the sub-selection within the text.
You might be able to use System Events to trigger a Cmd-C . Once text is in the clipboard it is effectively available to Applescript, and through pbPaste, to the command line. -- Last edited by RobTrew; 2010-11-19 at 09:46 AM..
Post 5
|
Hi.
I was wondering if an evernote document with task checkboxes unchecked could have the individual tasks sync'ed with omnifocus. Most of the tasks I generate in a day are resolved that day. Things that aren't completed at the end of the day I would like to sync with omnifocus. Any ideas? Thanks. -Ed
Post 6
|
|
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 |