captureDesktopScreenshot doesn't work properly

Hello, i’ve been having some troubles trying to use the UIVISION from a .bat, The problem is that when the UIVISION is executed from the .bat, when it encounters this specific command it throws an error.

But if the UIVISION is alredy opened and it gets executed from the .bat the macro works fine and that command works properly. And if i run it manually from the “Play macro button” it works fine too.

Here’s a pic of the bug

Here’s the same macro but pre-opened and just runned by the .bat

Here’s the .bat

I’m using UIVISION in desktop mode in windows, and the UIVISION version is 9.2.9

If you run a basic macro (as shown below), do you see the same issue? That macro works for me. I tested it from the command line:

{
  "Name": "1test",
  "CreationDate": "2024-9-23",
  "Commands": [
    {
      "Command": "echo",
      "Target": "start",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "captureDesktopScreenshot",
      "Target": "test123.png",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "done",
      "Value": "",
      "Description": ""
    }
  ]
}

This one works just fine, and the one that was giving the exception last time now works fine. For what i tested, it was something with the paths in wich was supossed to save the image. Don’t know why is working now though…

(Excuse me for late response)

1 Like