Job Tracker Help

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.
Locked
james.bernard
Posts: 11
Joined: Wed Apr 29, 2020 8:00 am

Job Tracker Help

Post by james.bernard »

Product, version and build: PS Studio 2020
32 or 64 bit version of product: 64
Operating system: Win 10
32 or 64 bit OS: 64

Hey all
I am new to PS Studio and PowerShell in general. I have created a PS Form for our Service Desk and Level 2 Techs to use. Right now the form freezes when running one of the functions, and I am trying to use the Job Tracker to keep the form free while the function runs. I created a test form with just one function to try and work it out and apply to the original form, but so far no luck. I have not been able to find a page that shows step by step instructions on customizing the job tracker functions yet. Can anyone tell me where I am going wrong? It runs the function and outputs to the richtextbox but the form still locks up. Any help is appreciated.

Code: Select all

$button1_Click={
	$Icheck = InfoCheck
	Add-JobTracker -Name $job -JobScript {
		
		Param (
			
			$Icheck
			
		)
		
		# other code
		
	} -CompletedScript {
		
		Receive-Job -Job $job 
		
	} -ArgumentList $Icheck
	
}

jvierra
Posts: 14589
Joined: Tue May 22, 2007 9:57 am
Answers: 2
Been upvoted: 1 time
Contact:

Re: Job Tracker Help

Post by jvierra »

We don't customize the functions. Just use the functions and supply the scriptblocks.

Load the JobTracker sample and run it to see how to use it.

Look in the InfoCenter for articles showing how the JobTracker works.

james.bernard
Posts: 11
Joined: Wed Apr 29, 2020 8:00 am

Re: Job Tracker Help

Post by james.bernard »

Thanks where can I find the Job Tracker sample?

james.bernard
Posts: 11
Joined: Wed Apr 29, 2020 8:00 am

Re: Job Tracker Help

Post by james.bernard »

Also i think i worded that badly. I am not changing the function. I supplied the code where i called the job tracker function. Is that setup incorrectly?

jvierra
Posts: 14589
Joined: Tue May 22, 2007 9:57 am
Answers: 2
Been upvoted: 1 time
Contact:

Re: Job Tracker Help

Post by jvierra »

What code. You just posted "#other code"

jvierra
Posts: 14589
Joined: Tue May 22, 2007 9:57 am
Answers: 2
Been upvoted: 1 time
Contact:

Re: Job Tracker Help

Post by jvierra »

james.bernard wrote:
Tue Jun 30, 2020 12:27 pm
Thanks where can I find the Job Tracker sample?
Just create a new form and add the custom control set named "Form - Job Tracker". Run it and investigate how it works.

Locked