Pasting words one by one from a copied CSV list

Hello!

I've been using Keyboard Maestro for the first time, to perform various tasks in my DAW, such as creating x-amount of tracks of a specific sampler, routing them etc... and it's been a joy to work with.

However, there's something I want to do - but unsure if it's possible, or know how to even approach it. I'll try explain as best I can.. forgive my newbieness;

I want to copy a bunch of words separated by "," to my clipboard - for example; "Guitar, Bass, Drums". Then create a short key that will paste one word then perform a keystroke, before pasting the next word / keystroke, then the next... How many times this is performed is based on how many words are in the clipboard.

For example;

Paste the word Guitar > Keystroke Tab
Paste the word Bass > Keystroke Tab
Paste the word Drums > Keystroke Tab

Is this possible?

Welcome to the forums!

Very, and it's the type of thing Keyboard Maestro excels at. Here's a very simple example that can be greatly improved, but shows you how it works:

Download Macro(s): paste loop.kmmacros (3.9 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.4.1
  • Keyboard Maestro v11.0.2

The macro activates TextEdit (just to have somewhere to work) and creates a new document. Then it parses the word list to be one word per line, and uses KM's For Each action to act on each line in the word list.

Within that action, it pastes the word and the Tab character.

Without knowing exactly how your incoming text is formatted, I just used "comma space" between words. Depending on the app you're working with, you might need to add a Pause 0.5 seconds or some such as the last step of the loop.

Hope that helps;
-rob.

Hey Rob!

Thanks for taking the time to reply. Will have a play around now to familiarise myself with the process.

Here's a video of what I want to do (i'm doing this manually in the video); What I want to do.mp4 - Google Drive

Essentialy, I just want a faster way to Copy text separated with , and paste them in an automated process.

How I need it to work - Keyboard Maestro splits the words, but instead of pasting them all in one go. I need it to paste the first word (for example) 'Guitar', then perform a Keystroke 'Tab' (as this will select the next track to rename in my sequencer) before pasting the next word 'Bass' and applying the Keystoke etc... if that makes sense?

If I can get something like that to work, it'll save a massive amount of time!

Please download the demo macro I posted above; that's exactly what it does.

-rob.

Took some time to understand how you set it up, but changed a few things, figured out the order needed and finally got to work! You're my internet hero :pray:

One thing, after pasting a word it seems to append it with 5 or 10 empty spaces before moving on. Is there anything I can do to stop this happening? If not, not a problem. I can sort this with a macro in the sequencer.

Thanks again! Owe you a beer.

Add a Filter action with Trim Whitespace just above the "insert text by pasting," having it trim the variable local_theWord. That should do it.

-rob.