![]() ![]() It also sets mod date to the correct field. For instance, if you have iCloud and a Gmail account, it will create "Imported iCloud" and "Imported Gmail" folders to store respective notes. This script will import all your Notes and create folders for each Account. Set the modification date of myNote to m圜reateDate Set the creation date of myNote to m圜reateDate Set myNote to create note with text myTitle title myTitle notebook "Imported Notes" tags Set myModDate to the modification date of thisMessage Set m圜reateDate to the creation date of thisMessage ![]() Keystroke "a" using command down - Cmd-A to select all Keystroke "|" using command down - Cmd-| to go to the note list but found end of script.Īctivate - bring the Notes client forwardĭelay 1 - wait to make sure the client has fully activated I've typed the following script out (and also tried to tweak it), but it gives me the following error: Expected end of line, etc. Sorry I'm such an applescript novice I've no idea how to include your suggestion. Hope this helps anyone running into the same problem! tell application "Notes" set theMessages to every note repeat with thisMessage in theMessages set myTitle to the creation date of thisMessage as string set myText to the body of thisMessage set m圜reateDate to the creation date of thisMessage set myModDate to the modification date of thisMessage tell application "Evernote" set myNote to create note with text myText title myTitle notebook "Imported" tags set the HTML content of myNote to myText set the creation date of myNote to m圜reateDate set the modification date of myNote to m圜reateDate end tell end repeatend tell ![]() I suppose you could truncate the title to only take the first 255 characters of the title, but I found that setting title to the creation date as a string was more clean. Since the "title" of a note is generally the first line, I was getting errors from Evernote when it was trying to create notes with a title larger than 255 characters. )įound that not all of my 1500+ notes from Apple's Notes.app had delineated titles. Which would then get A+ rock status in my book as well. If so, I'd greatly appreciate if pdxmph (or anyone else with the right scripting know-how) would be wiling to update the script accordingly. This would result in the correct "udpated-based sorting", at the modest price of losing the actual last update dates from before the import process. an extra space or punctuation character at the very end of the note text field). the acceptable work-around: if resetting the "updated" values correctly is not possible, then you could maybe get the script to at least least reestablish the correct "updated" order by altering this order either before or after the import, by getting either Mac Mail or Evernote to go into each of the notes in the reverse order and adding a benign edit (e.g. the smart fix: figure out how to capture the "last updated" values from the Mac database, and use them to reset the corresponding "updated" values in Evernote after the import is complete. So I see two possible fixes, neither of which I can implment myself, as I don't know enough about scripting, so I'm greatly appreciate if one of you could help here: Tried a quick "dumb fix" of reversing the sort order in Mac Mail prior to import but this doesn't help, since it is just a viewing option: the script apparently follows the order set by the last modified date of these notes. Once they land in evernote, they all have the correct original creation dates (lovely!), but they all have today's import date and time for their "updated" values (so they all differ by about 1 seoncd or so, as the script was walking through the list). The output from your script currently creates a rather awkward situation, since it actually reverses this order due to the fact that the "updated" date defined in Evernote for the newly imported notes is set by the order in which they are imported, and it seems that the script by default imports them starting from the most recently updated to least recent, as defined in the Mac's Note database. The capture of creation was a nice improvement, but many users also like to sort the notes based on date updated, from most recent to least recent, right? This method indeed rocks, but there's still one more detail before you get the full A+.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |