From Xojo Documentation
The compiler is returning the results of the script in msg.
Using the Print method in your script calls this event handler with the supplied string. In the event handler you can display the string.
This example Xojo script calls the Print event handler: