0

I am looking for ways of sorting my Reminders.app lists so that the order gets propagated to my various iCloud synced devices. I can do this manually, but it takes a very long time and quite tedious with multiple lists. I would like to be able to do this programmatically so I can run a script to get all my lists sorted by priority. I have tried multiple things and still don't have anything that works.

Manual Method: On macOS, go to reminders list, select Priority sort from the View menu, then drag a reminder to change the position causing all the reminders order to be set and the list is reverted to Manual sort order. This works, however, it usually takes 1-2 minutes for the app to update all reminders if there are lots of reminders in the list, hence the desire to script this (15 lists x 2 minutes of waiting per list = 30+ minutes of mostly waiting around for a relatively simple task that should be able to be scripted).

Using Swift and EventKit: I asked during WWDC 2020 at a lab about doing this in Swift using Event Kit and was told this wasn't supported or available.

Using JXA or Apple Script: I have been able to create new reminders and move reminders using JXA and Apple Script, however, it appears that there are multiple bugs that get in the way. First, the move(to:) command doesn't actually work (it appears to delete reminders), and while the duplicate(to:) command similarly doesn't work, it does appear to work like the move(to:) command should work, however, when moving tasks, their order doesn't appear to change, so it can't be used to even add tasks to a new list in any particular order.

Additional Caveats: I might be able to get things to work by completely re-creating tasks, however, this doesn't work as some tasks have attached links connected to email messages or web pages, and that data is not available to copy or access via scripting or even EventKit (just like the manual order information).

Honestly, this is something that Apple should fix in the Reminders app, but if anyone knows how to use UI scripting in the meantime, I would greatly appreciate it! I have used JXA and Apple Script to sort the reminder list on macOS by using UI scripting to select the View Menu, Sort Menu, then Priority, however, I have no idea how to "drag a row to another position" using UI scripting which would be the final piece to make this whole process scriptable. Surely this can be done with the accessibility options...

Kudit
  • 4,212
  • 2
  • 26
  • 32
  • 1
    [Previous discussion](https://developer.apple.com/forums/thread/649653) – foo Jun 30 '20 at 05:19
  • I just discovered a slightly better workaround which helps (still has to be done manually, but at least only one thing). You can command-click to select multiple reminders lists and then double-click to open in a new window with the selected lists visible. They can all be sorted by priority and moving just one row will lock all the selected lists into that sort order. Not great, but it does cut down on the tediousness. – Kudit Jun 30 '20 at 12:24
  • I'm confused about what you're trying to do. You have them sorted by priority; what order are you trying to put them *into*? – Ted Wrigley Jun 30 '20 at 19:32
  • I'm trying to get the manual sort to match the priority sort since only the manual sort is visible on iOS devices. Also point out that the workaround only worked with macOS 10.14 as 10.15 lost the ability to open multiple lists in a single window. – Kudit Oct 14 '20 at 21:39
  • Have you tried https://scriptable.app/? Or pythonista if you prefer python. If you do try scriptable, please share your script :) – Alex V. Mar 18 '21 at 17:50
  • @AlexV. scriptable.app looks cool, but is there an analogue for macos? – Jerry Green Jul 08 '21 at 14:23

0 Answers0