In the External Script action,the ability to pick up a environment variable and assign it to a variable once the script has run
This would be much easier than using STDOUT, especially when trying to get a decimal value that gets calculated, by for example a python script. If you have a sample of doing this, it would be great it you could provide some sample .bat file scripting
You can pass a variable to a external script using arguments, your external script must read the args and using it parsing the value. Viceversa you can use a stdout text of your external script to get data into a single variable string or decimal in “Execute external script” DragScript block.
It would provide another way to pick up external values
A process outside of Voyager, or the process run by the External Script action would result in an environmental variable being created/updated via the Windows set command. Voyager could then offer the ability to retrieve these values by name and assign them to Voyager variables.
Thanks to the Voyager team, I can see I can now do this. With a sample batch file of:
=== .bat file === @ECHO OFF
echo RESULT
I can suck in the STDOUT and assign it to a variable, perform boolean logic on it and output it using JollyString escaping
This allows custom, complex logic to be offloaded to an external process
=== drag script ===
Start: Events At Start are ENABLE
Script
String: resultString - Init Value = “UNASSIGNED”
External Script: C:\cloud\Dropbox\astronomy\batch\test_result.bat ; OutString=resultString
DO IF STRING VALUE: resultString is Equal to “RESULT” Send
Email using Voyager Account: myemail@gmail.com - test - ##VAR-resultString##
Wait Time: 00:00:15 [hh:mm:ss] Interval
End
Events