Paste Buffer - Filtering By LIne

Hello,

I'm attempting to use a trigger to output new lines from an itemized list.
Trigger is pressed = Line 1
Trigger is pressed again= Line 2
etc.

I've dug into the forum some & it appears to create this buffer I could approach it from nearly 4 different angles. Shell scripts, javascript, applescripts or regex. Is this correct? Are there advantages/drawbacks to each approach?

Here's an example to help get you started.

Below is just an example written in response to your request. You will need to use as an example and/or change to meet your workflow automation needs.

Please let us know if it meets your needs.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MACRO:   Paste One Line at a Time from a File [Example]

-~~~ VER: 1.0    2020-08-22 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

Paste One Line at a Time from a File [Example].kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.


ReleaseNotes

Macro Author: @JMichaelTX

This is just an example written in response to the below KM Forum Topic. You will need to use as an example and/or change to meet your workflow automation needs.

MACRO SETUP

  • Carefully review the Release Notes and the Macro Actions
    • Make sure you understand what the Macro will do.
    • You are responsible for running the Macro, not me.

HOW TO USE

  1. Each time you press the Hot Key, the next line in the file will be pasted
  2. The first time, and after all lines have been pasted, the file will be read and the tracking KM Variables will be set
  3. So this will stay in an infinite loop, pasting one line at a time.
  4. You can edit the source file any time, and after all lines in the current file have been pasted, it will use the updated file.
  5. You can force the Macro to start from the beginning of the file by doing a long press of the hot key.

==NOTE: You will need to change the Long Press Key to Match the Hot Key Trigger==

1 Like

Wow @JMichaelTX, thank you so much for writing this. This works flawlessly. I'll start familiarizing myself with what you crafted so I can hopefully help others in the future.

1 Like