Problem when Run Macro Using Command Line API

I need to run a macro using the command line API. Runs from a .bat file:
“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” “file:///C:/Users/Tom/Downloads/”
The macro has an click command (line 4) to bring the webpage forward to be scanned. This works fine when I run the macro manually from the UIV Chrome Dashboard… the macro opens the webpage to be scanned and while it is on top of the area to be selected, the click causes the full webpage to come on top of the UIV dashboard and the OCRExtractRelative (and rest of macro) runs to completion.

However, when the macro is called by the bat file, the webpage remains behind the UIV dashboard and the OCRExtractRelative times out without finding the target because, I assume, the webpage is not visible on the desktop to be scanned (see clip below of dashboard covering the webpage). The click (Line 4) does not bring the webpage above the dashboard.

Is there a command that will bring the webpage in focus when the macro is run from the bat file?


Yes, you must use this command bringBrowserToForeground add some pause before every command macro too fast can give errors.

Code Macro

  "Command": "bringBrowserToForeground",
  "Target": "",
  "Value": ""


1 Like

Thanks! Macro runs now from .bat.

1 Like