Batch delete highlights from "Kindle: Your Notes and Highlights" page

Amazon's "Kindle: Your Notes and Highlights" page doesn't allow you batch delete highlights (i.e., you have to delete each highlight individually). What would be the best way using Keyboard Maestro to automate the batch deletion of all highlights for any given book? Thanks!

Given how that feature works, via a pop-up menu on each item on the page, and that then prompts "are you sure?" with another dialog, I can't think of any good way to automate it. Perhaps it's possible with some Javascript magic, but that's beyond my skill level.

The best I can come up with is a macro that makes the task a one-hot-key operation—no mouse movement required. But it's manual, in that you have to first move over each of the Options buttons on the page, then execute the macro.

Download Macro(s): Kindle delete note.kmmacros (58 KB)

Macro screenshot

Macro notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.
System information
  • macOS 14.5
  • Keyboard Maestro v11.0.3

Usage: It's assigned to Shift-Control-Command-K, and should only be invoked after positioning the mouse over an Options button. It will click the button, then click the Delete note entry, and finally, click the Delete note button in the confirmation dialog.

This macro probably will not work for you after installing, due to the use of the Found Image action. If that's the case, you need to do the following manually:

Click an Options button, then click Delete note to bring up the confirmation dialog. Now use Shift-Command-Control-4 to drag-capture a region that has the two buttons on it—as close to this as you can get:

image

The image will be on the clipboard; paste it into the image well in the Found Image action. If your image is close to the same size as the one I used, it should work. If it's substantially different, you may have to change the 20 right offset number from image center to make sure it clicks on Delete note.

-rob.

1 Like

Thanks for your suggestion! I was having some trouble with the "click link" and "found image" elements, but I managed to figure out a solution using "move and click" alone.