Skip to content

Instantly share code, notes, and snippets.

@bhudgeons
Created August 22, 2012 05:12
Show Gist options
  • Save bhudgeons/3422433 to your computer and use it in GitHub Desktop.
Save bhudgeons/3422433 to your computer and use it in GitHub Desktop.
AppleScript that creates an Evernote "drop box" for files.
(*
Works in Evernote v.3.3.0.
(Note: I've read of people having problems with
AppleScript with the AppStore version of Evernote.
If you're having trouble, you might want to sync,
then delete the appstore version and download the
mac app directly from Evernote.)
Based on:
http://veritrope.com/tips/evernote-desktop-folder
Save this file as "Evernote Folder Action.scpt"
Put the file into /Library/Scripts/Folder Action Scripts/
(to navigate there in the Finder, under the Go menu item,
choose Computer, then Macintosh HD, then
Library -> Scripts -> Folder Action Scripts)
Make a folder (I called mine @evernote) that you want
to use for your dropbox.
Right-click on the folder, choose "Folder Action Setup…"
Choose the Evernote Folder Action.scpt file,
and make sure that Enable Folder Actions and "On"
for your folder and the script are all checked.
Close that window. Drop an item into the folder.
It should appear in Evernote (in your default folder,
with the tag "@evernote", then disappear from the
folder.
If you want to change the the tag that gets applied,
just change the "@evernote" below to whatever you want.
*)
on adding folder items to this_folder after receiving added_items
delay 5
tell application "Evernote"
repeat with i from 1 to number of items in added_items
set new_item to item i of added_items
create note from file new_item tags "@evernote"
end repeat
end tell
tell application "Finder" to delete added_items
end adding folder items to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment