Status output for plugin script without holding the script

Jun 21, 2016 at 7:44 PM
Hi there,

is there an easy possibility to make some status output that does not stop/hold the script and awaits interaction as it is the case for a MessageBox? Console.WriteLine("status message") doesn't seem to work for the plugin scripts.

Jun 25, 2016 at 12:00 AM
If you're using WPF, you can add a TextBlock to the Window and set its Text property to whatever status message you want. You can set its Text property either directly (in code) or through data-binding.

However, this won't work if you need your script to display messages while it's doing long-running calculations. To do that, you'll need to separate the UI and the calculations as different threads. I've written about this topic here: Create ESAPI Scripts That Don't Freeze the UI. In my example, I use a progress bar to show the calculation progress, but you can instead use a TextBlock to show status messages.