RosettaCodeData/Task/Simulate-input-Keyboard/PowerShell/simulate-input-keyboard.ps1
2026-04-30 12:34:36 -04:00

6 lines
247 B
PowerShell

Add-Type -AssemblyName Microsoft.VisualBasic
Add-Type -AssemblyName System.Windows.Forms
calc.exe
Start-Sleep -Milliseconds 300
[Microsoft.VisualBasic.Interaction]::AppActivate(Calc)
[System.Windows.Forms.SendKeys]::SendWait(2{ADD}2=)