I may not be the smartest guy in the room... but I'm not the dumbest. The documentation tab is completely void of anything. The examples don't really explain HOW to use it... just leads you by the nose on a couple of novel examples.
I started out very simply and it just isn't working. Opened notepad manually.
Select-Window -ProcessName "notepad" | Set-WindowActive | Send-Click -Button Right
The notepad window comes to the foreground but it does not right click. If it did right click I would get a menu box that would pop up.
I tried :
Select-Window -ProcessName "notepad" | Set-WindowActive | Send-Click -Button Left
Again it comes to the foreground but does not left click. If it did then the text I had highlighted from before would become un-highlighted as it clicked somewhere else.
Tried giving it a position thinking it wasn't anywhere in the window.
Select-Window -ProcessName "notepad" | Set-WindowActive | Send-Click -Left 800-Top 425 -Button Left
My desktop resolution is 1600x900 so it should be somewhere near the center which would be in the middle of my text document. Same behavior. I tried throwing in some start-sleeps and that didn't seem to make a difference.
Send-Keys seems to work
Select-Window -ProcessName "notepad" | Set-WindowActive | Send-Keys "derp"
It replaces what I had highlighted with derp which is exactly what i expected.
All I'm trying to do is simply send a left click, or hold left click for a duration of time, on an active window. It seems really simple but I don't get why it's not working.
Please advise or point me to some real documentation I can refer to.