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