Add a quick powershell script that focuses the slides window.

master
Zed A. Shaw 4 weeks ago
parent 0f2780478c
commit baa8f0f537
  1. 16
      scripts/focus_control.ps1

@ -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…
Cancel
Save