Page 1 of 1

GUI - Mimic Console Window?

Posted: Fri Jul 05, 2019 1:01 am
by swatto86
To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Powershell Studio 2016, Version: 5.2.121
32 or 64 bit version of product: 64-bit
Operating system: Windows 10 Pro
32 or 64 bit OS: 64-bit

*** Please add details and screenshots as needed below. ***

Hi all,

I am making a GUI form for my robocopy script, is it possible to have a control to 'mimic' the console window in that the robocopy output gets displayed to it?

Re: GUI - Mimic Console Window?

Posted: Fri Jul 05, 2019 7:21 am
by davidc
I recommend looking at the Text Box - Redirect Process Output form template.

It allows you to run an external executable and the output is redirected to the TextBox control.

Re: GUI - Mimic Console Window?

Posted: Fri Jul 05, 2019 9:19 am
by swatto86
davidc wrote: Fri Jul 05, 2019 7:21 am I recommend looking at the Text Box - Redirect Process Output form template.

It allows you to run an external executable and the output is redirected to the TextBox control.
Thanks for the response davidc - is this available in Powershell Studio 2016? I cannot seem to find it.

Re: GUI - Mimic Console Window?

Posted: Fri Jul 05, 2019 9:48 am
by davidc
Sorry, I did not notice you were using 2016. This template is included in the 2019 version. You can try looking at this topic thread:

viewtopic.php?f=21&t=12969&hilit=redire ... t&start=10

It was the inspiration for the template.

Re: GUI - Mimic Console Window?

Posted: Fri Jul 05, 2019 10:05 am
by swatto86
Thanks david, guess I will have to update my version - so expensive for a hobbyist :/

Re: GUI - Mimic Console Window?

Posted: Fri Jul 05, 2019 10:50 am
by davidc
FYI, we are running sale:

https://www.sapien.com/blog/2019/07/03/ ... -60-years/

Hopefully that will help!

Re: GUI - Mimic Console Window?

Posted: Sun Jul 07, 2019 1:14 pm
by swatto86
Found an easy way to output the robocopy output to a textbox:
  1. robocopy $source $destination /E | ForEach-Object {
  2.  
  3.             $txtOutput.AppendText($_ + "`r`n")
  4. }