my script uses two forms. i want to close second form after opening first one. how can i do it?
+1
A:
PowerShell has a built-in mechanism to report progress - a cmdlet called Write-Progress. Give it a try:
for ($i = 0; $i -le 100; $i +=5)
{
Write-Progress -Activity "Collecting ERP data" -Status "Downloading..." `
-PercentComplete $i
Start-Sleep -Seconds 1
}
Keith Hill
2010-02-14 22:32:20
thank you. that's cool cmdlet. how do i know when i stopped collecting data?
Varyanica
2010-02-15 07:07:31
I don't know enough about your particular scenario but presumably when the web service call returns you're done collecting data, right? At that point, you can make the Write-Progress display disappear by calling `Write-Progress -Activity "Collecting ERP data" -Status "Downloading..." -Completed`.
Keith Hill
2010-02-15 16:11:31
thank you. it helped. i should read mans more thoroughly.
Varyanica
2010-02-16 07:14:18