GUI - Mimic Console Window?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
swatto86
Posts: 26
Last visit: Mon Jul 10, 2023 4:38 am

GUI - Mimic Console Window?

Post 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?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: GUI - Mimic Console Window?

Post 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.
David
SAPIEN Technologies, Inc.
User avatar
swatto86
Posts: 26
Last visit: Mon Jul 10, 2023 4:38 am

Re: GUI - Mimic Console Window?

Post 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.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: GUI - Mimic Console Window?

Post 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.
David
SAPIEN Technologies, Inc.
User avatar
swatto86
Posts: 26
Last visit: Mon Jul 10, 2023 4:38 am

Re: GUI - Mimic Console Window?

Post by swatto86 »

Thanks david, guess I will have to update my version - so expensive for a hobbyist :/
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: GUI - Mimic Console Window?

Post by davidc »

FYI, we are running sale:

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

Hopefully that will help!
David
SAPIEN Technologies, Inc.
User avatar
swatto86
Posts: 26
Last visit: Mon Jul 10, 2023 4:38 am

Re: GUI - Mimic Console Window?

Post 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. }
This topic is 4 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.