GUI Menus with viewable process status

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 SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
NasaControl
Posts: 4
Joined: Tue May 01, 2018 9:40 am

GUI Menus with viewable process status

Post by NasaControl » Tue Aug 07, 2018 4:05 pm

I have a question, more so some support, I have purchased a full license copy of PowerShell Studio 2018, after my wide search on the Internet looking for something that I can actually build some administrative support helpdesk menus.

I am taking our development teams scripts and making some custom menus, so for I have been somewhat successful, I was able to create one menu, but after studying a vast majority of the videos that are online, I have run into a roadblock and/or some complications,

I am wanting to truly expose this to my supervisor, to show him how much this would be an asset to our company, ( have a little with my first Menu ), but he had come up with some questions, after I created the first menu, granted I am not a true PowerShell expert by no means, I figured with this particular application. ** PowerShell Studio 2018 **, it would not only help me shine in so many areas, but it would also be a great asset to our administrative tasks and helping our helpdesk team.

The roadblock I have ran into, also the question that had arise, I went with the basic form and created buttons, that are pressed that runs PowerShell scripts behind each button.

The scripts are from our Dev- team ( ps1.) that we run, but I wanted to create multiple menus, instead of running each script, like we have been doing.

My supervisor brought it to my attention, how do you know what’s going on, how can you seen how things are running, with that question ask, I have tried several times, to create some sort of functionality that shows once you press the button where you could actually see that process after pressing the button, sort of like the dual pane and the PowerShell ISE.
I was, and have been completely unsuccessful.

The templates in which you have built into the PowerShell Studio 2018 has been a great benefit to, and for me, it has made it easy for me to create some small menus, but that particular issue, I have not understood on how to create viewable process status,
I have looked, and searched all through the website, and also videos that are on YouTube, and I have not found any clear understanding on how to make that work, to create viewable process status, I truly need your expertise in that area, to reveal the processes that are taking place.


The other thing that I have run into, is the checkbox, what I am trying to do here, is have a list of servers, on a menu, with a checkbox beside them, and you can select which checkbox beside each server in which you would like the action to take place, and click an okay button and/or a submit button, I have been unsuccessful in that area as well, and there again your help will be greatly appreciated.

And another area where I am having a bit of complications, and have tried numerous of times, to create a menu, that calls upon a submenu.

I have also tried to create the tab menu as well, how do you add another TAB, and add viewable process status of task that is selected on that tab.

I am doing my best to try to take a multitude of standalone processes ( Dev ps1 scripts), and condense and/or move them down to a workable menu.



Thanks for your help, it is greatly appreciated

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: GUI Menus with viewable process status

Post by davidc » Wed Aug 08, 2018 7:40 am

We have several resources to help you create GUIs in PowerShell. The best resource is our information center:

https://info.sapien.com/index.php/guis

In regards to the MenuStrip help, the ContextMenuStrip is very similar in functionality so this article may still apply:

https://info.sapien.com/index.php/guis/ ... ip-control

The MSDN is also a great source. You can use PowerShell Studio to access it directly:

https://info.sapien.com/index.php/guis/ ... ntrol-help

You can handle your scenario a number of ways:

1. Keep the ps1 scripts external:
In this case, you will dot source the script from the GUI's click events. Add a menu item for each script in the designer and respond to the click of each menu item or use the MenuStrip's ItemClicked event to dot source the file.

2. Merge the ps1 scripts into a single script or executable.

In this case, you will want to use a Project (Look at Form Project) and add the dependent ps1 files to the project. Then you can merge them into the final script by setting the Build property of each file external script to Include. Then instead of dot sourcing the file, use the files' reference function in the click event:
Invoke-ScriptName_ps1

https://info.sapien.com/index.php/guis/ ... sing-forms

Note: This article uses Call verb which has been replaced with Invoke or Show for forms / GUIs.

Then you can package the project into an executable or export it as a ps1 file.

https://www.sapien.com/blog/2014/03/25/ ... 14-part-1/


If you have questions on how to use a control or GUI scripting in general, we have a forum dedicated to the subject:

viewforum.php?f=21

Since you have several different GUI related questions, I recommend breaking them up and posting them on them on our GUI forum.


Finally, this article shows you how to display output in a GUI:

https://info.sapien.com/index.php/guis/ ... pplication
David
SAPIEN Technologies, Inc.