Acess Alt + Tab with PowerShell ???

Welcome Forums General PowerShell Q&A Acess Alt + Tab with PowerShell ???

Viewing 2 reply threads
  • Author
    Posts
    • #244154
      Participant
      Topics: 6
      Replies: 7
      Points: 55
      Rank: Member

      Hello, I want to be able to access Alt+tab data options from PowerShell. anyone every come across a way to do this?
      I use alt+tab all the time but want to build a function that gets the programs in alt+tab assigns a row number then prompts for input and puts that app in front. I have built a lot of scripts that display an array to me then I key in a number to execute similar to invoke-history I want to be able easily jump to a word, excel or exchange NPP++ ect without having to tab many times ect. I just can’t fiond a way to get the alt+tab objects then a method to alt+tab to them?
      any ideas?

    • #244157
      Participant
      Topics: 8
      Replies: 568
      Points: 2,170
      Helping Hand
      Rank: Community Hero

      They are just your open windows. I think you’d need to use pinvoke or similar to get the windows and then distinguish by their title or other properties.

    • #244178
      Participant
      Topics: 6
      Replies: 7
      Points: 55
      Rank: Member

      I was able to use the following method:
      [Microsoft.VisualBasic.Interaction]::AppActivate($_.ID)

Viewing 2 reply threads
  • You must be logged in to reply to this topic.