Obviously I do not know what you have in your script and how will it generate the 'result', but whatever it does it can they fire up a changeLayout API call or schedule add call to add a new layout to the display.
API calls are documented here - https://xibo.org.uk/manual/api/#/displayGroup/displayGroupActionChangeLayout
Alternatively if it should change some media on a layout that already exists then you can do that too via API.
With that changeLayout call, there are several topics on this very site about it, but I'll say it again.
Each display has it's own unique display specific displaygroupId which you can use in that call to changeLayout on a single specific display.