"If something has been copied to the system clipboard in the past 10 seconds"?

Here's what I'd want to do

:If something has been copied to the system clipboard in the past 10 seconds

  1. Open up new tab
  2. Paste
  3. Insert by typing " generic phrase"
  4. Hit Keystroke: Return

:If something has been typed in the past few seconds

  1. Insert by typing " generic phrase"
  2. Hit Keystroke: Return

These are the only two scenarios so if I can create a condition for either it would work.

I may have to use two different processes for this but I'd like to see if I can use some sort of if then else function to use the same one. I'm always searching things with the same secondary word and I'd like the same trigger whether i'm remembering the name of a company and typing it in or If I'm copying one.

Triggered in the past? Like this:

06-pty-fs8
[test] Triggered in the Past.kmmacros (3.3 KB)

Thanks! this didn't exactly work for me but sent me down the right track and i figured it out

@rayk, that's great that you solved your own issue.
Would you mind posting your solution so others could benefit?

1 Like

Sure thing, fyi for everyone reading the first one might have worked and I was just the problem and this might not be the best way to do it.

The Macro Group "10 Second copy pause" is just a frivolous group created for the sake of being in the condition of enabled or disabled. The problem with the first comment for me was that the macro disabled itself and wouldn't be reenabled by the system clipboard changing (something being copied). The frivolous macro group solves this. Then once you have this macro and the frivolous group set up you can put the macro group being enabled as a condition in any other macro.

edit: I now realize I was very stupid and could have just used the original process posted and just made the condition being disabled not enabled. Oh well.

If you are referring to my macro, the macro re-enables “itself” once it completes.

Point of the disabling/enabling is to avoid repeated triggering of additional instances while the first instance is already running. (My macro had the typed string trigger, and with that trigger it would launch a new instance each time you type a letter…)

You're completely right after re-examining (I'm very new to this program and didn't know what a typed string trigger was or did), yours is a much better solution than mine, I just couldn't figured out what I was looking at, at the time. Thanks again so much for your help to me and the forum.

I also didn't clarify in my original post ( but I thought I did) that I wanted the typed and copied to be 2 different paths which added to my confusion.

Oh, I thought you asked for that:

If something has been typed in the past few seconds

I just obeyed :wink:

I realized that, but I left it to you to either…

  • create two different macros from the example, or
  • wrap your actions with an If…Then action, with a condition based on the actually used trigger (this should work fine with Trigger Tokens, IIRC)

No problem, just ask if you need help :slightly_smiling_face:

This is what I meant with “a condition based on the actually used trigger”:

05-pty-fs8
[test] Triggered in the Past, with Trigger Condition.kmmacros (5.9 KB)

This way you can switch your actions in function of the trigger that actually triggered the macro (clipboard or typed string), without the need of two macros.

1 Like