Skip to content

Instantly share code, notes, and snippets.

@zevaverbach
Last active December 1, 2021 12:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zevaverbach/6400e04de1ab44f8df66d1d027a22c56 to your computer and use it in GitHub Desktop.
Save zevaverbach/6400e04de1ab44f8df66d1d027a22c56 to your computer and use it in GitHub Desktop.
A Keyboard Maestro macro to copy the URLs from an Apple Reminders list to a text file.
<?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>Normal</string>
<key>CreationDate</key>
<real>657286652.24957097</real>
<key>Macros</key>
<array>
<dict>
<key>Actions</key>
<array>
<dict>
<key>ActionUID</key>
<integer>413</integer>
<key>AllWindows</key>
<false/>
<key>AlreadyActivatedActionType</key>
<string>Normal</string>
<key>Application</key>
<dict>
<key>BundleIdentifier</key>
<string>com.apple.reminders</string>
<key>Name</key>
<string>Reminders</string>
<key>NewFile</key>
<string>/System/Applications/Reminders.app</string>
</dict>
<key>MacroActionType</key>
<string>ActivateApplication</string>
<key>ReopenWindows</key>
<false/>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
<dict>
<key>ActionUID</key>
<integer>429</integer>
<key>MacroActionType</key>
<string>Pause</string>
<key>Time</key>
<string>.7</string>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
<dict>
<key>Action</key>
<string>MoveAndClick</string>
<key>ActionUID</key>
<integer>415</integer>
<key>Button</key>
<integer>0</integer>
<key>ClickCount</key>
<integer>1</integer>
<key>DisplayMatches</key>
<false/>
<key>DragHorizontalPosition</key>
<string>0</string>
<key>DragVerticalPosition</key>
<string>0</string>
<key>Fuzz</key>
<integer>15</integer>
<key>HorizontalPositionExpression</key>
<string>800</string>
<key>MacroActionType</key>
<string>MouseMoveAndClick</string>
<key>Modifiers</key>
<integer>0</integer>
<key>MouseDrag</key>
<string>None</string>
<key>Relative</key>
<string>Absolute</string>
<key>RelativeCorner</key>
<string>TopLeft</string>
<key>RestoreMouseLocation</key>
<false/>
<key>VerticalPositionExpression</key>
<string>150</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>424</integer>
<key>Actions</key>
<array>
<dict>
<key>ActionUID</key>
<integer>433</integer>
<key>MacroActionType</key>
<string>Pause</string>
<key>Time</key>
<string>.7</string>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
<dict>
<key>ActionUID</key>
<integer>414</integer>
<key>KeyCode</key>
<integer>34</integer>
<key>MacroActionType</key>
<string>SimulateKeystroke</string>
<key>Modifiers</key>
<integer>256</integer>
<key>ReleaseAll</key>
<false/>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>432</integer>
<key>MacroActionType</key>
<string>Pause</string>
<key>Time</key>
<string>.5</string>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
<dict>
<key>Action</key>
<string>MoveAndClick</string>
<key>ActionUID</key>
<integer>417</integer>
<key>Button</key>
<integer>0</integer>
<key>ClickCount</key>
<integer>1</integer>
<key>DisplayMatches</key>
<false/>
<key>DragHorizontalPosition</key>
<string>0</string>
<key>DragVerticalPosition</key>
<string>0</string>
<key>Fuzz</key>
<integer>15</integer>
<key>HorizontalPositionExpression</key>
<string>1600</string>
<key>MacroActionType</key>
<string>MouseMoveAndClick</string>
<key>Modifiers</key>
<integer>0</integer>
<key>MouseDrag</key>
<string>None</string>
<key>Relative</key>
<string>Absolute</string>
<key>RelativeCorner</key>
<string>TopLeft</string>
<key>RestoreMouseLocation</key>
<false/>
<key>VerticalPositionExpression</key>
<string>250</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>418</integer>
<key>KeyCode</key>
<integer>0</integer>
<key>MacroActionType</key>
<string>SimulateKeystroke</string>
<key>Modifiers</key>
<integer>256</integer>
<key>ReleaseAll</key>
<false/>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>421</integer>
<key>KeyCode</key>
<integer>8</integer>
<key>MacroActionType</key>
<string>SimulateKeystroke</string>
<key>Modifiers</key>
<integer>256</integer>
<key>ReleaseAll</key>
<false/>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>428</integer>
<key>KeyCode</key>
<integer>53</integer>
<key>MacroActionType</key>
<string>SimulateKeystroke</string>
<key>Modifiers</key>
<integer>0</integer>
<key>ReleaseAll</key>
<false/>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>434</integer>
<key>MacroActionType</key>
<string>Pause</string>
<key>Time</key>
<string>.2</string>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
<dict>
<key>ActionUID</key>
<integer>419</integer>
<key>AllWindows</key>
<false/>
<key>AlreadyActivatedActionType</key>
<string>Normal</string>
<key>Application</key>
<dict>
<key>BundleIdentifier</key>
<string>com.apple.TextEdit</string>
<key>Name</key>
<string>TextEdit</string>
<key>NewFile</key>
<string>/System/Applications/TextEdit.app</string>
</dict>
<key>MacroActionType</key>
<string>ActivateApplication</string>
<key>ReopenWindows</key>
<false/>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
<dict>
<key>ActionUID</key>
<integer>431</integer>
<key>MacroActionType</key>
<string>Pause</string>
<key>Time</key>
<string>.5</string>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
<dict>
<key>ActionUID</key>
<integer>422</integer>
<key>KeyCode</key>
<integer>9</integer>
<key>MacroActionType</key>
<string>SimulateKeystroke</string>
<key>Modifiers</key>
<integer>256</integer>
<key>ReleaseAll</key>
<false/>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>423</integer>
<key>KeyCode</key>
<integer>36</integer>
<key>MacroActionType</key>
<string>SimulateKeystroke</string>
<key>Modifiers</key>
<integer>0</integer>
<key>ReleaseAll</key>
<false/>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
</dict>
<dict>
<key>ActionUID</key>
<integer>425</integer>
<key>AllWindows</key>
<false/>
<key>AlreadyActivatedActionType</key>
<string>Normal</string>
<key>Application</key>
<dict>
<key>BundleIdentifier</key>
<string>com.apple.reminders</string>
<key>Name</key>
<string>Reminders</string>
<key>NewFile</key>
<string>/System/Applications/Reminders.app</string>
</dict>
<key>MacroActionType</key>
<string>ActivateApplication</string>
<key>ReopenWindows</key>
<false/>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
<dict>
<key>ActionUID</key>
<integer>430</integer>
<key>MacroActionType</key>
<string>Pause</string>
<key>Time</key>
<string>.7</string>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
<dict>
<key>ActionUID</key>
<integer>427</integer>
<key>KeyCode</key>
<integer>126</integer>
<key>MacroActionType</key>
<string>SimulateKeystroke</string>
<key>Modifiers</key>
<integer>0</integer>
<key>ReleaseAll</key>
<false/>
<key>TargetApplication</key>
<dict/>
<key>TargetingType</key>
<string>Front</string>
</dict>
</array>
<key>CountExpression</key>
<string>21</string>
<key>MacroActionType</key>
<string>Repeat</string>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
</array>
<key>CreationDate</key>
<real>659534570.99250603</real>
<key>ModificationDate</key>
<real>659544582.06644499</real>
<key>Name</key>
<string>copy_urls_from_reminders</string>
<key>Triggers</key>
<array/>
<key>UID</key>
<string>51E8A7AC-2791-42E4-A7CC-36106B4F4B56</string>
</dict>
</array>
<key>Name</key>
<string>Global Macro Group</string>
<key>ToggleMacroUID</key>
<string>4855913F-E55D-40BD-BA33-A951B0FAC3A2</string>
<key>UID</key>
<string>9EC93A15-A175-4162-B06E-757619AFC39D</string>
</dict>
</array>
</plist>
@zevaverbach
Copy link
Author

zevaverbach commented Nov 25, 2021

I made this script out of desperation after having tried several less poky ways of getting at the Reminders "URL" field. I'm using the latest version of Keyboard Maestro, which as of today is 10.0.1.

Items to tweak to your use case

  • change the number of repeats
  • possibly this is custom to my given screen resolution, but possibly it's universal
  • if your machine is a bit slower, you may have to tweak the pause durations

Peculiar Assumptions / "Prerequisites"

This script assumes

  • you're starting from the bottom of the list, and that you've already scrolled down to the bottom.
  • you can copy paste those last ten items or so yourself
  • both Reminders and the text editor are each taking up maximum screen real estate ("maximized" but not "full screen")

@zevaverbach
Copy link
Author

What I tried before embarking on this madness:

  • pyicloud -- ran into unexpected authentication problems even after fully authenticating (there are no docs for Reminders yet)
  • Reminders CLI -- only provides the 'title' field
  • Pythonista 3's reminders package -- Even though it detects the url field, it's always None.

@zevaverbach
Copy link
Author

Oh and I also tried OSAScript (the JS flavor), but it thinks there's no such field as "url" (lowercase or uppercase).

@zevaverbach
Copy link
Author

Ugh, also Reminders will start getting sluggish after a bit. Restart it every 50-100 rows...

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