Unable to perform Xclick on ocr=[text]

Antivirus_UPdated.zip (4.4 KB) Hi Team,

I am using UI .vision for desktop automation, as part of it I am using
OCR to perform actions.
Unable to perform Xclick on ocr=[text]

Could you please look into it, Attached script for reference.

Why? What error message do you get? The macro in your ZIP file does not contain any XClick | OCR=... command!?

Also, make sure you are using the latest V5.9.5.

{
  "Name": "Antivirus_UPdated",
  "CreationDate": "2020-11-19",
  "Commands": [
    {
      "Command": "XDesktopAutomation",
      "Target": "True",
      "Value": ""
    },
    {
      "Command": "XRun",
      "Target": "C:\\Program Files\\Avast Software\\Avast\\AvastUI",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": ""
    },
    {
      "Command": "XClick",
      "Target": "iy37yt_dpi_96.png@1.00",
      "Value": ""
    },
    {
      "Command": "XClick",
      "Target": "ovrjlw_dpi_96.png@0.5#1",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": ""
    },
    {
      "Command": "XClick",
      "Target": "Update_dpi_96.png",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": ""
    },
    {
      "Command": "XClick",
      "Target": "hfgqp7_dpi_96.png",
      "Value": ""
    },
    {
      "Command": "XDesktopAutomation",
      "Target": "False",
      "Value": ""
    }
  ]
}

Antivirus_UPdated_OCR.zip (5.1 KB)

Attached script with OCR
UI vision 5.9.5

Device name uivision-test-01
Processor Intel® Xeon® CPU E5-2667 0 @ 2.90GHz 2.90 GHz (2 processors)
Installed RAM 8.00 GB

|System type|64-bit operating system, x64-based processor|
|Pen and touch|No pen or touch input is available for this display|

Ok… but what is the error message? A screencast would be useful to understand the issue. Because for me ocr=text works fine.

Yeah sure sharing it in sometime.

Script execution video:

Step 1: Minimise UI Vision

Step 2: Launch exe file

Step 4: OCRextract and saving into variable

Step 6: Xclick | ocr = [$varaible]

Step 8: OCRextract and saving into variable

Step 10: Xclick | ocr=[{$var}]

@ulrich Should you require any more details, do let me know.
Thank you for looking into it.

Xtype and Xclick require browser maximized and focus on screen, can not work without focus on screen

Step 1: Minimise UI Vision

I have commented Step 1: Minimise UI vision, even after doing so Xclick | ocr=text is not working.

Need posting the complete code of macro

A possible error is in command ocr=text to click

I see in your image OCR=[XXX] but in this command [ ] not required.

Other problem is you must have in focus and front the image of element to find, you must study to have in front the image otherwise image recognition do not work.

Image reconigtion work only if you have in front the image desktop.

After you run ui vision you must have in front of desktop the image to recognize (this is the hard part od desktop automation).

Ok thanks, Let me check about “in front the image”.

Any pointers “in focus and front the image”: on it would be great

This is the hardest part of desktop automation, as soon as you start the macro you have to have on the screen the elements that will be recognized with desktop automation, this is the real part difficult to react to, usually I start the macro, after starting the program to be automated so that it is immediately visible in the desktop. to solve this problem you must study more time.