parent
0f2780478c
commit
baa8f0f537
@ -0,0 +1,16 @@ |
||||
Add-Type @" |
||||
using System; |
||||
using System.Runtime.InteropServices; |
||||
public class User32 { |
||||
[DllImport("user32.dll")] |
||||
[return: MarshalAs(UnmanagedType.Bool)] |
||||
public static extern bool SetForegroundWindow(IntPtr hWnd); |
||||
} |
||||
"@ |
||||
|
||||
$process = Get-Process | Where-Object { $_.MainWindowTitle -like "*Bezos Loves Slides*" } |
||||
Write-Host $process.MainWindowTitle |
||||
|
||||
if ($process) { |
||||
[User32]::SetForegroundWindow($process.MainWindowHandle) |
||||
} |
||||
Loading…
Reference in new issue