Skip to content

Instantly share code, notes, and snippets.

@rashita
Created June 27, 2014 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rashita/2a6029ee563b8f69115a to your computer and use it in GitHub Desktop.
Save rashita/2a6029ee563b8f69115a to your computer and use it in GitHub Desktop.
tell application "Evernote"
set foundNotes to (get selection)
--選択したノート数が2より小さい場合は弾く
if (length of foundNotes) < 2 then
display alert "二つ以上のノートを選択してください。"
return
end if
repeat with i from 1 to (length of foundNotes)
if i = 1 then
set leftlink to "<a href=\"" & (note link of item (length of foundNotes) of foundNotes) & "\">≪" & (title of item (length of foundNotes) of foundNotes) & "</a>"
set rightlink to "<a href=\"" & (note link of item (i + 1) of foundNotes) & "\">" & (title of item (i + 1) of foundNotes) & "≫</a>"
else if i = (length of foundNotes) then
set leftlink to "<a href=\"" & (note link of item (i - 1) of foundNotes) & "\">≪" & (title of item (i - 1) of foundNotes) & "</a>"
set rightlink to "<a href=\"" & (note link of item 1 of foundNotes) & "\">" & (title of item 1 of foundNotes) & "≫</a>"
else
set leftlink to "<a href=\"" & (note link of item (i - 1) of foundNotes) & "\">≪" & (title of item (i - 1) of foundNotes) & "</a>"
set rightlink to "<a href=\"" & (note link of item (i + 1) of foundNotes) & "\">" & (title of item (i + 1) of foundNotes) & "≫</a>"
end if
tell item i of foundNotes to append html "<BR>" & leftlink & "     " & rightlink
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment