Hi, I got the progressbar to work with the 'marquee' style. I use it when starting an external exe, which has an unknown execution time. This works fine, but when I insert an empty do-while function to repeat as long as the process run, then the progressbar doesn't show up, until AFTER the do-while has exited ? ------------------------------start-process $exefile -ArgumentList $arguments $buttonSplitInvoices.Enabled=0#Initialize the Progress Bar
$progressbar1.Style='Marquee'$progressbar1.MarqueeAnimationSpeed=40$progressbar1.Visible=1do {} while ((Get-Process "pcscmd" -ErrorAction SilentlyContinue) )-----------------------Can you help me whit this one ?Best regards,Kenneth
'Strange' behaviour of porgressbar
'Strange' behaviour of porgressbar
I recommend reading the following blog article: http://www.sapien.com/blog/2011/07/15/p ... ive-loops/ David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
'Strange' behaviour of porgressbar
I also recommend getting the process object and checking if the process completed.$process = Start-Process -FilePath $processPath -PassThruif($process.HasExited){ #The Process
finished } you might also want to look at using a timer to check the process instead of looping. David
finished } you might also want to look at using a timer to check the process instead of looping. David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.