Browse Source

Update Download_Sophia.ps1

pull/350/head
Dmitry Nefedov 3 years ago
committed by GitHub
parent
commit
3e842dc06b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Download_Sophia.ps1

6
Download_Sophia.ps1

@ -237,12 +237,12 @@ if (-not ("WinAPI.ForegroundWindow" -as [type]))
Add-Type @SetForegroundWindow
}
Start-Sleep -Seconds 1
Get-Process -Name explorer | Where-Object -FilterScript {$_.MainWindowTitle -match "Sophia Script for Windows $([System.Environment]::OSVersion.Version.Major)"} | ForEach-Object -Process {
# Show window, if minimized
[WinAPI.ForegroundWindow]::ShowWindowAsync($_.MainWindowHandle, 5)
Start-Sleep -Seconds 3
# Force move the console window to the foreground
[WinAPI.ForegroundWindow]::SetForegroundWindow($_.MainWindowHandle)
}
} | Out-Null

Loading…
Cancel
Save