Useful macro to get notifications text

I had an idea a while back to get the text of notifications that pop up on my computer. It's especially frustrating to debug a KM error notification because I have to click and drag it to see it properly (it's possible there's another way to see it clearly that I just haven't checked). So, I created a macro that gets you the text from the notification and display it. It's a bit crude in the way that I implemented it, but it basically grabs the text of the notification using applescript and then creates some arrays and asks you which part of the notification you want to copy. After that, it asks you if you would like to display the text in a window.

The reason I'm posting this in Q&S is because it's not quite cleaned up yet and I'd love some suggestions on how to make it a little more elegant.

Here are a few things I'd like to do/am working on:

  • clean up the applescript
  • fix my filtering/search&replace
  • I'm working on a get OTP/numbers from notification macro.
  • always collect data from new notifications, so that I can just look at the information from the last few.

Let me know if you have any thoughts. I believe this will be immensely useful to myself

image

Get notification text.kmmacros (4.7 KB)

1 Like