Created
June 27, 2014 01:43
-
-
Save rashita/2a6029ee563b8f69115a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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