Run command do not work when is inside a macro started from command line (batch file)


Today i tried RPA 5.5.3 for firefox but there is a problem with run command.

When you run a macro via command line, RPA do not load macro list, if you have inside macro stated via command line others macro (runned by run command) give error because RPA can not load macro list and do not execute the macro via run command.

Today I found all my macro with error because if will be started via batch file and inside macro cose there are part of macro loaded via run command

2020-03-19T15:54:58.972Z - [info] Executing: | run | /Functions/Save_Screenshot | |
2020-03-19T15:54:59.052Z - [error][ignored] Failed to find macro with path: /Functions/Save_Screenshot

Macro working well with old RPA, but seem with RPA 5.5.3 not load macro list and can not using run command when you have macro started via command line (in my case batch file).


The same problem there is when you start a macro via bookmarks, need a solution to load macro list in run command otherwise it’s impossible to use run command inside macro started via bookmarks or command line.

Ouch. I confirmed the issue, thanks for reporting it. This will be fixed asap.

As workaround you can use the new switch loadmacrotree=1 (default is loadmacrotree=0)

Hi @admin

Help me to add loadmacrotree=1 (default is loadmacrotree=0 )

Where I must add this loadmacrotree=1 i must add in command line code (batch file) or i need to add in bookmarks saved in browser ?

Can you post 2 example please, thanks


I think this change is good not to load the list of macros because ui vision is faster but you have to add an exception at least for the macro executed with the run command inside another macro.

When using the command RUN command ui vision should read only the invoked macro and run it (including its path) so it would be perfect.

The problem currently occurs for both macros started via command line and for macros started through bookmarks.

I tryed to add in command line &loadmacrotree=1 but seem to not work, macro will not load and continue with error.

In bookmarks i can not know how i can add loadmacrotree=1


javascript:(function() {try {var evt = new CustomEvent('kantuRunMacro', {detail: {name: "Test/Test",from: 'bookmark',storageMode: 'browser',closeKantu: false,loadmacrotree=1}});window.dispatchEvent(evt);} catch (e) {alert('Kantu Bookmarklet error: ' + e.toString());}})();

There are more error in your syntax, try to generate a new bookmark and you see the difference

have not sense closeKantu: false,loadmacrotree=1

because in other option there is : you add =

I tried without success new command loadmacrotree=1 in batch file for me do not work.

Sorry I don’t have the new version yet to test. I just took what admin had posted. Have you tried loadmacrotree:1 in bookmarks?

Right now when I start a macro from bookmarks the macro list appeared but I didn’t add any parameters.

When I added in batch file loadmacrotree=1 the macro list do not load

I confirmed the problems. It seems there is an issue with loadmacrotree=1 => this will be fixed asap

1 Like


Fix this bug for command line (batch file and powershell) and for bookmarks please.

Hi, I have the same problem. I need to run with command line macros that call subroutines within. I tried the loadmacrotree=1 command but isn’t working. Has this been fixed?
Thanks in advance!

I noticed we forgot to update this post, so thanks for asking. This issue is fixed, just note that the RUN macro path is case sensitive. So in the example below:

  • :x: Run | sub/Sub_DemoCsvRead_FillForm <= Wrong because folder name is Sub and not sub
  • :white_check_mark: Run | Sub/Sub_DemoCsvRead_FillForm <= Ok! Works fine from bookmarks and command line


Test: Start macro with sub routine from bookmark and all works:

PS: The RUN path is only case sensitive when the macro is started from bookmarks or command line, because then the macro tree is not loaded and UI Vision searches for the subroutine macro directly in the browser file system and the browser file system is case sensitive. Linux users will not be surprised, because they are used to case sensitive file names :wink:

Hi Admin,

Thanks for the quick reply.

I revised the code and, unfortunately, there is no case sentitive mistake and the error still happens.

Please find attached two print screens:

  • one when the code is run from command line with the error. As in the video you just posted there is no macro tree loaded although loadmacrotree=1 is used
  • the other is a print of UI Vision desktop showing the macro tree and the subroutine on both places, the tree and code

Please find also below the utilized command line in the batch file:

START “” “C:\Program Files\Google\Chrome\Application\chrome.exe” "file:///C:/Users/wilso/Desktop/uivision/macros/Verifica_aviso_ferias_Apice.html?direct=1&closeBrowser=0&closeRPA=0&continueInLastUsedTab=0&loadmacrotree=1


The HTML page run method is deprecated and does not support calling other macros with RUN. But with the new file method all works fine. So the correct command line looks like this:

START “” “C:\Program Files\Google\Chrome\Application\chrome.exe” "file:///C:/test/"


I still have the need to run a macro and the new ui vision html file method is not working at all, unfortunately.

I keep getting the file not found error and UI.Vision and the macro are not loaded.
The deprecated model, though, seems to work fine and calls the subroutine, but I believe it is not recommended.

Macros are stored in Google Chrome, although this is a Desktop application.
Here is the batch file I am using:
:::::::::::::::::::::: Variables :::::::::::::::::::::

set folder=SIFAC_150/505_Ferias/
set macro=Chama_ferias_folha
set var1=01.2021
set direct=1
set storage=0
set closeBrowser=0
set closeRPA=0
set continueInLastUsedTab=0
set loadmacrotree=1

::::::::::::::::::::::: Chrome ::::::::::::::::::::::

START “” “C:\Program Files\Google\Chrome\Application\chrome.exe”
ping -n 15 localhost >nul 2>&1

:::::::::::::::::::::: Ui Vision :::::::::::::::::::::

START “” “C:\Program Files\Google\Chrome\Application\chrome.exe” “file:///C:\Users\wilso\Desktop\uivision\test\bat\autorun.html?direct=%direct%&macro=%macro%&savelog=log1.txt&cmd_var1=%var1%&closeBrowser=%closeBrowser%&closeRPA=%closeRPA%&continueInLastUsedTab=%continueInLastUsedTab%&loadmacrotree=%loadmacrotree%”
ping -n 10 localhost >nul 2>&1

::::::::::::::::::::::::: Exit :::::::::::::::::::::::


Thanks in advance

Hi all,
I really need to use the command line and it worked using the deprecated mode. Today when I started UI.Vision I received the notification of the new product version. The autorun HTML file now has start- at the beginning of the filename and cmd_var1 parameter does not send values to the macro anymore from the command line.
I got rid of the start- prefix, the macro runs but the cmd_var error is still there.
Can you please help me?

Thanks in advance