Ok, it quite works. Thanks Opaque. And yes, myapp.js is interactive.
Works but it stops at the first few lines. If I run manually the script sh, it works until to the end.
It seems that the macro can’t wait the execution.
I say it because, if I run the macro on debug mode, pressing F8, the blink curson exit from the Shell(…) line very fast, and doesn’t wait as expected. But it is only my assumption.
Then, second problem is that my app shows many console.log commands, but I can see them only on log file.
I would determine a successful when the app retrieve a table with chrome headless and save it on the a xls file. Then, it insert the file on the active ods file.
I think I’m asking to Basic too much.
Maybe can I use a macro python? I don’t know anything on python, however.
My intent was to launch a console, run the app.js, showing the messages, and then auto close it.
With VBA I can do it. The shell command open a window prompt, execute the node script and exit when finished.