Looking for: "There is Text Selected" True/False

EDIT by @_jims, 2022-01-07:

The version of the macro I posted previously had a bug. The use cases tested are:

ABC
XYX

  1. ABC (or XYZ) in Clipboard, no text selected, trigger macro, paste text.
  2. ABC in Clipboard, XYZ selected, trigger macro, paste text.
  3. XYZ in Clipboard, XYZ selected, trigger macro, paste text.

The previous version of the macro failed the third use case. :frowning:

I've updated this post with a corrected macro. I apologize if the previous version caused confusion.


Hi @rowan. I was working through this very issue when I was developing a macro named Augment or Filter Text. I discovered a few nuances during the process.

Here's a simplified macro that includes the relevant actions.

DOWNLOAD Macro File:
Get Selected Text- Otherwise Clipboard v1.1.kmmacros (16 KB)
Note: This macro was uploaded in a DISABLED state. It must be ENABLED before it can be run. If it does not trigger, the macro group might also need to be ENABLED.

Macro-Image

1 Like