I have a NodeJS script that is launched by an AutoHotKey script. I need this NodeJS script to return a specific value when exiting, so it can be retrieved and used by the AHK script. I am able to get the value returned by the process directly in my AHK script, but it's not the wanted one.
How do I make my process return a specific value?
So far, I tried using
process.exit(myValue); and
process.exitCode = myValue; and
process.stdout.write(myValue) but none of this works.
Here is my AHK script (which works fine) :
RunWait, C:\path_to_node\node.exe C:\path_to_script\index.js,,, output
MsgBox, %output%