How to copy and paste numbers that are changing?

I’m trying to copy and paste a specific chunk of numbers to a box 9 different times, each time the number is different. Idk if I should use x click since if I do it will only read and paste the current ones, when they change I will get error since they are never the same after the loop.

For example I copy and paste 6 different numbers, 9 times, but on the 10th time the numbers loop and all 9 are completely different: 674986, 193853, 701594 etc.

I tried to use xclick relative but the boxes green and pink are not working or reading.

The great thing is that the numbers are in a line so if I can just get the ui to read the line and get the specific chunk of numbers, then that would solve my issue but I’m not sure how to do this, as I’m still learning this software

Can you maybe add a screenshot? This would clarify the situation.

port sschot

in the photo with the red box, the numbers after the : are the ones that change but the numbers before the : remain the same, im trying to automate copying and pasting these changing numbers into the port (the little box in the 2nd image)

It’s a website ? can you post the url ?

Without url page is very hard to help you.

No website, I’m using notepad and the settings tool on my computer.

I can always paste the numbers to a online notepad

It’s very hard in my opinion you can use OCR command to read and after save the data in csv and elaborate it

I agree with @newuserkantu - the OCRExtractRelative command should work. You can use the left not changing side of your image as anchor to find and then OCR the right side. Your input image could look like this:


Of course, this image is only a draft. The real input image should be created with the drawing tool inside UI.Vision.

For more details see this screencast:

OCRExtractRelative starts at 0:42 minutes.

I’m not sure how well Kantu’s desktop automation works with SourceExtract, but you could use SourceExtract’s Regex functions. This will get the entire port including the IP:

  "Name": "Regex",
  "CreationDate": "2020-2-24",
  "Commands": [
      "Command": "open",
      "Target": "NOTEPAD",
      "Value": ""
      "Command": "sourceExtract",
      "Target": "regex=190\.2\.140\.41:(\d+)",
      "Value": "value"
      "Command": "pause",
      "Target": "2000",
      "Value": ""
      "Command": "echo",
      "Target": "${value}",
      "Value": ""

I am currently unaware on how to use Regex capture groups, however I have asked it Here: How do you use Regex capture groups

I will update this post if I get answers.

I’m trying to use ocrextract relative to paste the numbers into the port, when I try to use the pink and green boxes it keeps giving me a green/pink box not found error


Hi, can you please attach your “green/pink” image here? Then I test what goes wrong.

On first glance the image seems to be very small, that might be the issue.

Currently I’m trying to test to see if on my end my boxes work, and It seems they do not, in this image I was using for ocr relative to close a chrome tab once it sees the anchor image google search ip, to close that tab only. But again still giving that cannot find box error unknown

Are you using multiple monitors? because IVR dose not currently work with multiple monitors. see: [issue #41] XClick dual monitor support

No just 1 wide monitor, xclick works and xtype since now I’ve automated my workflow about 60% now with uiv, it’s just now when I try to add precise details into the automation like if you see ‘this’ then do “this” via the pink/green boxes it gives me an error, I’m still really new to this software so I could be doing a minor thing wrong or have a button unticked somewhere in the settings, also I am using multiple chrome tabs

If the text change how you can use ocrextract relative ?

The image automation is the last option to choice.

How do you fix the box error? Once I fix this then I believe I can fill in the missing puzzle