Description
Takes input as a string in Evernote search syntax (e.g. tag:mytag), searches for web clippings and returns a newline separated list of the source urls from the matches.The Code
set searchterms to text returned of (display dialog "Enter search terms in Evernote search format" default answer "Search terms") as text
tell application "Evernote"
set _notes to find notes searchterms & " source:web.clip"
set _urls to {}
repeat with _note in _notes
if source URL of _note is not missing value then
set end of _urls to source URL of _note
end if
end repeat
set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set _urls to _urls as text
set AppleScript's text item delimiters to astid
return _urls
end tell
tell application "Evernote"
set _notes to find notes searchterms & " source:web.clip"
set _urls to {}
repeat with _note in _notes
if source URL of _note is not missing value then
set end of _urls to source URL of _note
end if
end repeat
set {astid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set _urls to _urls as text
set AppleScript's text item delimiters to astid
return _urls
end tell