PowerShell SendKeys to InternetExplorer ComObject
问题 Here's one method I found which brings the IE ComObject window to the foreground and uses SendKeys. How would I send a sequence of key presses using this method? $ie = New-Object -ComObject InternetExplorer.Application $ie.navigate("www.google.com") do {sleep 1} until (-not ($ie.Busy)) Add-Type -AssemblyName System.Windows.Forms Add-Type @" using System; using System.Runtime.InteropServices; public class StartActivateProgramClass { [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType