Clipboard values


#1

Hi, I would like to ask if kantu is capable to handle multiply values in clipboard.
Let say I have copied a values on clipboard with
value1,value2,value3,value4

How do I send paste it to a specific field, I need help about this,
Ive tried the !clipboard but its pasting it at once in the first field of my form.

Need help


#2

Currently Kantu supports only one (= the current) clipboard values.


#3

thank you for the reply, so I cannot set a specific value for example
set firtsname {fristname}
set lastname {lastname}

then seperated by (,)

Clipboard value: firstname,lastname


#4

Ah, sorry, I did not understand the question correctly. I first thought of these clipboard extender tools that I used years ago :wink:

So… if you clipboard contains first, last this means that the ${!clipboard} internal variable also contains first, last. So the only problem to solve is to split this string and assign it to individual variables that you can then use to fill in forms etc.

To split the value using Javascript use the storeEval command. Then we have

storeEval | JS code to get the first value | var1
storeEval | JS code to get the 2nd value | var2

and then you can use ${var1},… in your macro, for example with type:

type | locator1 | ${var2}
type | locator2 | ${var2}

See also https://stackoverflow.com/questions/5269856/how-to-split-comma-separated-string-using-javascript/5269884


#5

Thank you will try this, still new to coding :slight_smile: