I’m completely new to PowerShell and am confused about some of its command syntax. I’ve been looking around google; however, some of the syntax I’ve found such as
Send-Keys "%(ea)Testing{Enter}{F5}"
has errors that I can’t seem to get rid of.
Say I open Calculator with
var script = @"
Start-Process calc.exe
";
powerShell.AddScript(script);
powerShell.Invoke();
How does one go about entering in values for fields and sending keystrokes?
That is, enter in a 5, hit the – key, enter in a 6, then hit the ENTER key?
Or even better,
how does one, using PowerShell, enter in some stock symbol (which isn’t the default textfield) then search for it by hitting enter? (after opening firefox.exe, navigating to http://www.yahoo.com)
Thank you for your time
One thing to bear in mind is that it takes a while for the application to start-up, you could be sending your keys before calculator is ready for them.
Try something like:
This should get you a quote from google: