Something like this:
Code:
Add-Type -TypeDefinition @" using System; using System.Runtime.InteropServices; public static class User32 { [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern IntPtr GetForegroundWindow(); public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); }"@[User32]::SendMessage([User32]::GetForegroundWindow(), 1075, 2945, 0)
Statistics: Posted by Fla$her — 2024-12-26, 09:08 UTC