Skip to content

Instantly share code, notes, and snippets.

@yoko
Created February 25, 2012 17:17
Show Gist options
  • Save yoko/1909587 to your computer and use it in GitHub Desktop.
Save yoko/1909587 to your computer and use it in GitHub Desktop.
on run {input, parameters}
if length of input ≤ 1 then
try
do shell script "/usr/local/bin/growlnotify -a Evernote -t \"Clip Images\" -m \"Image not found\""
end try
return
end if
tell application "Evernote"
if (not (notebook named "Inbox" exists)) then
make notebook with properties {name:"Inbox"}
end if
set aTitle to do shell script "date \"+%Y-%m-%d %H:%M\""
set images to items 1 thru -2 of input
set aSourceURL to last item of input
set aNote to create note title aTitle with text "" attachments images notebook "Inbox"
tell aNote to set source URL to aSourceURL
end tell
try
do shell script "/usr/local/bin/growlnotify -a Evernote -t \"Clip Images\" -m \"Completed\""
end try
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment