I use bash to call UIV via API, it feeds filenames or information I want to see in the UIV via !cmd_var# - then upon exit of the macro, if there exists a certain CSV with values, python or bash do more work based on what was returned.
instead of using UIV to launch your automation, use automation to launch UIV and integrate it.
hth.