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

Welcome Forums General PowerShell Q&A Automating operations with a GUI app; press "tab" "enter" keys with PowerShell

Viewing 1 reply thread
  • Author
    Posts
    • #43495
      Participant
      Topics: 24
      Replies: 8
      Points: 0
      Rank: Member

      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
      Keymaster
      Topics: 13
      Replies: 4872
      Points: 1,844
      Helping HandTeam Member
      Rank: Community Hero

      Have a look at SendKeys in .NET. There've also been several posts to that effect here... https://powershell.org/forums/search/sendkeys/

Viewing 1 reply thread
  • The topic ‘Automating operations with a GUI app; press "tab" "enter" keys with PowerShell’ is closed to new replies.