Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Keyboard Maestro macro: copies a text from the clipboard and saves it as a new note in Apple Notes
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>OnceWithPalette</string>
<key>AddToMacroPalette</key>
<false/>
<key>AddToStatusMenu</key>
<false/>
<key>CreationDate</key>
<real>568761441.108006</real>
<key>CustomIconData</key>
<string>KMEP-SelectMenuItem</string>
<key>KeyCode</key>
<integer>7</integer>
<key>Macros</key>
<array>
<dict>
<key>Actions</key>
<array>
<dict>
<key>MacroActionType</key>
<string>DeletePastClipboard</string>
<key>PastExpression</key>
<string>0</string>
</dict>
<dict>
<key>Action</key>
<string>Copy</string>
<key>IsDisclosed</key>
<false/>
<key>MacroActionType</key>
<string>CutCopyPaste</string>
<key>TimeOutAbortsMacro</key>
<false/>
<key>TimeOutPeriod</key>
<real>0.10000000000000001</real>
</dict>
<dict>
<key>Action</key>
<string>TrimWhitespace</string>
<key>Destination</key>
<string>Variable</string>
<key>DestinationVariable</key>
<string>Text</string>
<key>MacroActionType</key>
<string>Filter</string>
<key>Source</key>
<string>Clipboard</string>
</dict>
<dict>
<key>DisplayKind</key>
<string>None</string>
<key>IncludeStdErr</key>
<false/>
<key>MacroActionType</key>
<string>ExecuteAppleScript</string>
<key>NotifyOnFailure</key>
<false/>
<key>Path</key>
<string></string>
<key>StopOnFailure</key>
<false/>
<key>Text</key>
<string>tell application "Keyboard Maestro Engine" to set noteText to getvariable "Text"
tell application "Notes"
make new note at folder "Notes" with properties {name:noteText}
end tell</string>
<key>TimeOutAbortsMacro</key>
<true/>
<key>TrimResults</key>
<true/>
<key>TrimResultsNew</key>
<true/>
<key>UseText</key>
<true/>
</dict>
</array>
<key>CreationDate</key>
<real>577630789.86933196</real>
<key>ModificationDate</key>
<real>580386299.92816603</real>
<key>Name</key>
<string>Save to Notes from clipboard</string>
<key>Triggers</key>
<array>
<dict>
<key>FireType</key>
<string>Pressed</string>
<key>KeyCode</key>
<integer>8</integer>
<key>MacroTriggerType</key>
<string>HotKey</string>
<key>Modifiers</key>
<integer>0</integer>
</dict>
</array>
<key>UID</key>
<string>EA544AB4-AECE-4286-BAB3-DBC5D63496F7</string>
</dict>
</array>
<key>Modifiers</key>
<integer>6400</integer>
<key>Name</key>
<string>Save text</string>
<key>PaletteUnderMouse</key>
<false/>
<key>Theme</key>
<dict>
<key>Size</key>
<integer>20</integer>
<key>Theme</key>
<string>Evening</string>
<key>UseDefaultInstead</key>
<false/>
<key>UseIcon</key>
<false/>
<key>UseTitle</key>
<false/>
<key>UseTrigger</key>
<true/>
</dict>
<key>ToggleMacroUID</key>
<string>7C3EA16D-DA47-42B7-B247-0173652F3F64</string>
<key>UID</key>
<string>9D7764EF-4481-4543-A629-2FFC3A9FFE4D</string>
</dict>
</array>
</plist>
@maltsev

This comment has been minimized.

Copy link
Owner Author

@maltsev maltsev commented May 24, 2019

To import the macro to Keyboard Maestro save it as Save to Notes from clipboard.kmmacros and double-click the file.
After the import, you could configure the trigger hotkey.

@maltsev

This comment has been minimized.

Copy link
Owner Author

@maltsev maltsev commented May 24, 2019

Preview:
Preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment