Automating operations with a GUI app; press "tab" "enter" keys with PowerShell

This topic contains 1 reply, has 2 voices, and was last updated by  Don Jones 2 years ago.

  • Author
  • #43495


    I have an unfamiliar GUI application that I want to automate with PowerShell. It is not a web-based application, and I do not have access to its API beyond double clicking icons. I'll have to figure out the location of its .exe. It has its own menus and windows. I do not have access to its source code. I do not know what language it was written in. I have administrator rights to the server with this application. Is there a way to enter data into fields of a third party application with PowerShell?

    I was thinking if I can invoke the "Tab" key with PowerShell, I can have a .ps1 script launch the application. I could hard code the data into the script. With Tab as my navigational tool, I think I can traverse through the application. How do I press "enter" with PowerShell?

    Is there a better way than using the "Tab" key? How do I tab around the Windows desktop using a PowerShell script?

  • #43499

    Don Jones

    Have a look at SendKeys in .NET. There've also been several posts to that effect here...

You must be logged in to reply to this topic.