GUI that can handle lots of output from command line tool

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

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 7 years and 4 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.
Locked
User avatar
Alcasczar
Posts: 31
Last visit: Sat Jun 22, 2019 9:30 am

GUI that can handle lots of output from command line tool

Post by Alcasczar »

Product, version and build: 5.2.129
32 or 64 bit version of product: 64
Operating system:
32 or 64 bit OS:Windows 10 64bit
PowerShell Version: 5


I have a need to replace a decent script that works great in Powershell to a GUI due to some really novice end users who panic when it comes to doing things in the shell.

The problem I am faced with is there doesn't appear to be a decent way that I've found to ouptut the results from the command line into the GUI. I've seen I can |out-string into textbox1.text but this method appears to cause issues with users who like to click around which causes things to "hang"and must force quit the gui . This output does tend to scroll out quite a bit.

Anyone know of a good way to say pipe this output within the gui perhaps a special form control that can do it well ? The output is coming from sqlldr.exe which is part of the Oracle 11g client.

EDIT: FWIW: I did read https://www.sapien.com/blog/2014/12/15/ ... tion-copy/




DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: GUI that can handle lots of output from command line tool

Post by DevinL »

[TOPIC MOVED TO POWERSHELL GUIS FORUM BY MODERATOR]
DevinL
SAPIEN Technologies, Inc.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: GUI that can handle lots of output from command line tool

Post by DevinL »

From what you said about the users causing things to hang, you may want to look at this blog entry on responsive forms: https://www.sapien.com/blog/2012/05/16/ ... ive-forms/

You can run the exe in the background as a job and get the output to display when it's complete so that the form isn't held up while the exe is running.
DevinL
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: GUI that can handle lots of output from command line tool

Post by jvierra »

Output from most command line programs can be capture at the execution

$textbox.Lines = $results.

If the process takes a long time then refer to Devin's suggestions.

If you need more help you will need to provide an example and more detail.
User avatar
Alcasczar
Posts: 31
Last visit: Sat Jun 22, 2019 9:30 am

Re: GUI that can handle lots of output from command line tool

Post by Alcasczar »

Thanks to the both of you, I'll give them both a try. Thank you very much.

Al
User avatar
jazz albert
Posts: 16
Last visit: Sat Nov 05, 2016 3:09 pm

Re: GUI that can handle lots of output from command line tool

Post by jazz albert »

Alcasczar wrote:Thanks to the both of you, I'll give them both a try. Thank you very much.

Al
Indeed that is worth sharing!
This topic is 7 years and 4 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.
Locked