How to load macro list from command line

Hi,

i am invoking the RPA from command line via a batch script. Though i am getting below error -
[error]

A requested file or directory could not be found at the time an operation was processed.

Is it because of below - if yes then how to fix it?
"Started by command line.

Macro list not loaded."

Regards,
Ashiskh

@ashiskh

You must use this

  • loadmacrotree=0 - (A rarely needed setting) If 1, all macro files are loaded at startup into the side bar treeview. This increases startup time, thus the default is “0”. Note that when using loadmacrotree=0 UI.Vision RPA looks directly in the file system for the macro, and thus the folder and macro names are case-sensitive on all operating system if the internal HTML5-storage mode is used (= browser file system). In hard-drive mode only Linux is case-sensitive.

https://ui.vision/rpa/docs

Hi newuserkantu,

Thanks for your reply.
It seems to be a deprecated option cannot be used now.

Regards,
Ashiskh

@newuserkantu sorry, I was using it without “&”. I corrected it now. So it is loading the tree but now i am getting error as below -
[error]

No folder found for MyTestsuite, or no macro found in it

Any help is much appreciated.

Got It. Need to fix path as “Automation/MyTestsuite” :slight_smile: :slightly_smiling_face:

@ashiskh

Post your command line please

Hi ashiskh, could you post your command line, it could help others understand how it works… Thank’s a lot !

https://ui.vision/rpa/docs#cmd

Thank you for the link!
But in fact, my problem is simple: I have a very simple script (a test to open a calculator) that work’s very well in UI.Vision.
However, when I make a command line with osascript to launch it (here it is : osascript -e ‘tell application “Firefox” to open location “file:///Users/-----/test_calc.html?loadmacrotree=1&closeRPA=1&direct=1&macro=test_calc”’), it opens the UI.Vision window but I have to launch the script with the “Play Macro” button to execute it…
Is it possible to launch the script so that it executes by itself without having to do anything?
Thank’s.

loadmacrotree is not needed, it is an old deprecated command. I never use it.

“file:///Users/-----/test_calc.html?

Using the “macro as HTML table” file is also the old method. Try with the new ui.vision.html file method <= same link as @User9898 posted :wink:

See also here: Run command do not work when is inside a macro started from command line (batch file) - #16 by admin

Yes, that is how it should work automatically. If it still does not work with “ui.vision.html”, please record a screen video and post it here, and we can have a look at it.

Thank’s a lot Ulrich. I am going to experiment with all that and I’ll let you know :slight_smile:

Concerning loadmacrotree many people speak about it in the forum, so… How to find infos about deprecated settings ?

I for sure will look again the infos in the link you recalled.
May I ask you a question concerning the file ui.vision.html. This file is generated from API in the settings, right ? What is the difference with the file one can export (in HTML too) from the macro ? Are they similar ?

OK, I’m pretty sure that I miss something very simple to make all this work.
Have a nice day,
Daniel.

OK, I finally solved the problem(s) and it works, I even made an application with Automator that I can launch from the desktop. The command line instruction reads as follows:
osascript -e ‘tell application “Firefox” to open location “file:///Users/Me/Desktop/uivision/ui.vision.html?loadmacrotree=1&closeRPA=1&direct=1&continueInLastUsedTab=0&macro=test_calc”’
Two options made the script work: loadmacrotree=1 to make macros visible to the script at launch (without it, the script must be launched manually, not very practical…) and continueInLastUsedTab=0 to remove the error messages: “Invalid tab ID: 78” or “Invalid tab ID: 136” (that I don’t even know where they come from). The “closeRPA=1” option closes the UI.Vision window at the end of the execution.
Well, it seems that (at least for me) deprecated options are still necessary for the script to work properly. Honestly, I still need to familiarize myself with these options to fully grasp their meaning, I will then move on to more complex (and interesting :slight_smile: ) processes.

Thank’s to those who share their experiences and advice, here.
Best, Daniel.

1 Like