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 6 years and 6 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.
You haven't implemented the whole JobTracker. It requires some global collections and a timer event. It is nit just a single function. No time tick - no results.
Obviously I'm new to this. I read the blog again, looked at the examples given and couldn't figure it out.
As I mentioned I do have multiple jobs that I want to copy from and to. I have a foreach loop that I pass my scriptblock with my arguments. Basically the same code in my previous post. Do I make the listview or datagrid as you suggested as a global variable?
The ListView is already a variable in scope. All controls are always in-scope. What is in your timer code? Have you started the timer? Is this a PSF or is it a hand coded form?
Use a datagrid.
Use a CSV to create load the DGV. Include the folder path in the CSV.
You loop can get all values from the CSV/DGV.
Before doing that create a new form and add Tracker. Test the code suggestions with one job until you understand how it works. Once you understand then move the lesson to your form an manage jobs in a loop.
Unfortunately you have chosen a set of design requirements that are well beyond your current skill set. You will have to slowly work through this. Build one small piece at a time until you understand how it works. This is the nature of all programming. No programmer comes with built-in knowledge of any technology. Programming is about teaching yourself how things work.
Food for thought. Here is how to approach managing jobs. Onc you understand how this works you can experiment with changing controls or adding other complexities.
# define this at script level so we don't create hundreds of them
$fso = New-Object -ComObject Scripting.FileSystemObject
This topic is 6 years and 6 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.