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
#!/usr/bin/env xcrun swift | |
import Foundation | |
let kDelayUSec : useconds_t = 500_000 | |
func DragMouse(p0: CGPoint, p1: CGPoint) { | |
let mouseDown = CGEventCreateMouseEvent(nil, .LeftMouseDown, p0, CGMouseButton.Left) | |
let mouseDrag = CGEventCreateMouseEvent(nil, .LeftMouseDragged, p1, CGMouseButton.Left) | |
let mouseUp = CGEventCreateMouseEvent(nil, .LeftMouseUp, p1, CGMouseButton.Left) |
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 "Notes" | |
repeat with thisAccount in accounts | |
repeat with thisFolder in folders of thisAccount | |
repeat with thisNote in notes of thisFolder | |
set myTitle to the name of thisNote | |
set myText to the body of thisNote | |
set myCreateDate to the creation date of thisNote | |
set myModDate to the modification date of thisNote | |
tell application "Evernote" | |
set importedNote to create note with html myText  |