Created
February 9, 2016 01:30
-
-
Save JMichaelTX/14ba870bcd8668338829 to your computer and use it in GitHub Desktop.
Evernote Mac Create File (.inetloc) Using Note Classic Link with AppleScript
This file contains hidden or 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
(* | |
=============================================================================== | |
[EN] Create Note Link as File | |
=============================================================================== | |
VER: 2.0 LAST UPDATE: 2016-02-08 | |
PURPOSE: | |
• Create a File (web location) Using the Evernote Classic Note Link | |
AUTHOR: JMichaelTX | |
Find any bugs/issues or have suggestions for improvement? | |
Contact me via PM or at blog.jmichaeltx.com/contact/ | |
REQUIRED: | |
1. Mac OS X Yosemite 10.10.5+ | |
2. Mac Applications | |
• EN Mac 6+ | |
4. INTERNAL FUNCTIONS: | |
• createWebLocFile() | |
REF: The following were used in some way in the writing of this script. | |
(1) http://blog.nik.me/post/44311282771/create-a-desktop-shortcut-to-an-evernote-note | |
(2) https://discussion.evernote.com/topic/37457-sharing-evernote-to-devonthink/?p=208821 | |
=============================================================================== | |
*) | |
tell application "Evernote" | |
set lstSelectedNotes to selection | |
if lstSelectedNotes ≠ {} then | |
set oNote to first item of lstSelectedNotes | |
set strNoteTitle to title of oNote | |
set strNoteLink to note link of oNote | |
my createWebLocFile(strNoteLink, strNoteTitle) | |
end if | |
end tell -- Evernote | |
--~~~~~~~~~~~~~~~~~~~~~~ END OF MAIN SCRIPT ~~~~~~~~~~~~~~~~ | |
###—————————————————————————————————————————————— | |
# createWebLocFile() Create File with Hyperlink | |
# | |
# Ver 2.0 2016-02-08 | |
###—————————————————————————————————————————————— | |
on createWebLocFile(pstrNoteLink, pstrNoteTitle) | |
set strPrompt to "For Note: " & pstrNoteTitle | |
set aliFolder to choose folder with prompt strPrompt | |
tell application "Finder" | |
set aliFile to make new internet location file to pstrNoteLink at (aliFolder) with properties {name:pstrNoteTitle} | |
--- OPEN FINDER SHOWING FILE --- | |
reveal aliFile | |
end tell -- application "Finder" | |
end createWebLocFile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are new to installing and/or using AppleScripts, or would like detailed instructions, see:
How to Install AppleScripts or JXA Scripts