Customize clipboard contents and then paste

So I want to test user database, when I copy them they are copied in this format username:password what I want to achieve with KM is:

  • Paste the username in the clipboard that is before (:) colon and hit tab key

  • Paste the password that is after that was in the clipboard (:) colon and press enter

How can I achieve this any ideas?

Here's an example Macro that should get you started.
You will need to modify to suit your requirements.


MACRO:   Paste Data from Clipboard [Example]


#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/9/9/9931bdc56bdb23fddc032f3d31a3060a7ee2bd9c.kmmacros">Paste Data from Clipboard [Example].kmmacros</a> (6.3 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**

---



![image|532x1217](upload://o2dQIBuS7C5Dd8Lfa0TzKDbK4Z1.jpg)

---

Questions?
1 Like

This is a really tiny issue and perhaps not something the OP has to worry about. Passwords can often contain special characters, including colons (where usernames are typically restricted to alphanumerics), in which case the regular expression can potentially match the wrong components of the string, e.g. "username:pass:word" matched against (.+):(.+) will return "username:pass" and "word" in the first and second capturing groups.

If that were to be a situation that arises for the OP, the regular expression can be slightly adjusted to (.+?):(.+), which will return "username" and "pass:word" as would be desired.

1 Like

Good catch. I agree with your RegEx.

1 Like

It worked! First of all thank you very much for your time and effort I have no words to express how impressed I am with what you are doing.