Quantcast
Channel: Windows Automation Snapin for PowerShell
Viewing all 129 articles
Browse latest View live

New Post: Using Task Scheduler

$
0
0
I am trying to use the Task Scheduler, Powershell and WASP to automate the downloading of a file from IE9. The file is generated using javascript on the client browser. The script I have works fine is the task is run as logged on user, however when I change the task to 'Run whether user is logged on or not' it fails.

When I make a call to 'Select-Window' nothing is returned. Is this expected behaviour?
How can I find the dialog pop-up and click the Save button - it has the same MainWindowTitle as its parent.

New Post: Using Task Scheduler

$
0
0
Scheduled tasks that don't run "interactive" when the user is logged on can't spawn UI, so opening IE isn't going to work.

You might be able to use Microsoft's Invoke-WebRequest (because it uses IE headless but still seems to run javascript), but I wouldn't even be sure about that. You could possibly use selenium with their phoenixjs(?) headless browser ... but again, I am not sure.

New Post: How to access IE11 file save dialog?

$
0
0
The file save pop up has no title on IE11/Windows 8.1. How can I select the Save or Cancel button? I tried sending %S but sometimes it grabs the IE Safety menu. I need something like:

Select-Window iexplore | Select-Control -Class "Frame Notification Bar" | Set-WindowActive | Send-Keys "%S"

but more precisely targeted to the dialog box.

Thanks

New Post: How to access IE11 file save dialog?

$
0
0
I'm a lot confused. Are you using the universal app version of explorer? Otherwise the file save should be a regular dialog box ...

Select-Window iExplore | Select-ChildWindow | Set-WindowActive | Send-Keys "%S"

New Post: How to access IE11 file save dialog?

$
0
0
Hi,

It's not a standard file dialog in IE11 in Windows 8.1; I have also tried your example code and it does not work. It's some kind of hybrid window with no title. The Alt-S will open the Safety menu if it does anything at all.

Image

New Post: How to access IE11 file save dialog?

$
0
0
Oh ... that thing.

I wonder what makes that come up some times but not others? That is a DirectUIHWND, it's basically invisible, as far as I can tell.
You can use Send-Keys though, just have to target that hwnd:
Select-UIElement -ProcessName iexplore |               # Get IE
Select-UIElement -Class "Frame Notification Bar" |     # Find the notification bar
Select-UIElement -class "DirectUIHwnd" |               # And the invisible window
Send-Keys "%S"-WindowHandle { $_.NativeWindowHandle } # Send-Keys doesn't have an alias "NativeWindowHandle" on  WindowHandle
You could also use right-click "save as" in the previous step of your automation to force the other dialog.

New Post: How to access IE11 file save dialog?

$
0
0
Thanks, I will try this. Unfortunately can't even do a right click as the download link is a JavaScript pop up menu

New Post: How to access IE11 file save dialog?

$
0
0
Hi,
Please bear with me as I am not a PowerShell guru. It looks like Select-UIElement is part of a newer version from poshcode. I can't for the life of me get it to work and there seems to be no link from the download page on this site or install instructions for the three necessary modules. Can you help?
Thanks

New Post: How to access IE11 file save dialog?

$
0
0
Oh my gosh. That explains why I had to do the crappy -WindowHandle mapping, I was mixing and matching cmdlets from two different modules. LOL. I swear when I was writing that example yesterday I wanted to call the me that wrote Send-Keys an idiot for missing the "NativeWindowHandle" alias ;-)

Just use the old commands:
Select-Window iexplore |
Select-Control -Class "Frame Notification Bar" |
Select-Control -class DirectUIHwnd | 
Send-Keys "%S"# magically picks up the window handle, as it should! duh!
Hopefully that works for you, sorry about that.

New Post: How to access IE11 file save dialog?

$
0
0
Thanks! Finally got this to work. The Alt-S will still randomly select the Safety menu if it is there so I worked around it by temporarily turning off the toolbar with:

$ie.ToolBar = $false

There's quite a few unanswered questions around on this. Hopefully this thread will now show up in searches.

Created Unassigned: Opening new window within program - WASP not recognising new window [10938]

$
0
0
Hey,

Trying to enter details into a new window within a program, WASP doesn't seem to be able to do this?
It doesn't seem to register another window has opened within the program? Is there a snippet of code I need to enter for it to register a sub-menu?

The sub menu is within IIS Manager


Thanks
Thomas

New Post: Opening new window within program - WASP not recognising new window

$
0
0
Hey,

Trying to enter details into a new window within a program, WASP doesn't seem to be able to do this?
It doesn't seem to register another window has opened within the program? Is there a snippet of code I need to enter for it to register a sub-menu?

The sub menu is within IIS Manager

Select-ChildWindow - Does not seem to work.. how is it actually applied? Very little documentation.

Thanks
Thomas

Created Unassigned: Remote use of WASP [11050]

$
0
0
I am looking to use WASP to control another desktop.

I have installed WASP and create a remote profile which loads the WASP snapin at the start of the session (Add-PSSnapin WASP).

However when I run WASP commands I receive no response / output

Is this possible?

New Post: Windows 10 multiple desktops

$
0
0
I love WASP so far. Any chance it could be modified to be multiple desktop aware? I'd love a send to DesktopX command. Maybe call it SendTo-Desktop?

New Post: Windows 10 multiple desktops

$
0
0
Just send it the Winkey + arrow keys!

It has full capability to address the x, y coordinates of the entire virtual desktop (and beyond: you can send windows off screen). It is possible to write a script that counts monitors and figures out each monitor's boundaries ... but Winkey+Arrow works really well already.

P.S. Have you tried my UIAutomation script-based WASP 2 http://poshcode.org/4099 or the binary UIAutomation module http://uiautomation.codeplex.com

New Post: Windows 10 multiple desktops

$
0
0
If I just want to send one or two windows to another desktop, Winkey+arrow is fine. I’d like to be able to send a list or maybe a category of windows to another desktop. Say, send all remote desktops and SSH windows to a desktop. Or all email windows to a desktop.

It would also be nice to be able to script adding a desktop. Scenario: desktop is way too cluttered. Run script that adds another desktop (maybe I already have one, so this will be #3) and then move all my open emails to that desktop.

New Post: Flash site send-click issue

$
0
0
Hi,

I was wondering if you can send a double-click through wasp onto a website that contains a flash app. I'm trying to click on a "menu" item of the flash website but sending the command only places the mouse cursor to the coordinates but the actual clicking does not occur.

Thank you

New Post: Windows Security Pop-Up

$
0
0
I am installing some component which throws security pop with "Install" and "Don't Install" option. Now i am able to get hold off that windows however i am not able to click on install and don't install option. Kindly help me with this. I have tried following commands till now

Select-Window -title "Windows Security" | Set-WindowActive | Send-Keys "%n"

Select-Window -title "Windows Security | Set_WindowActive | Select-Control -title "Do&n't I&nstall" | Send-Keys "%n"

Select-Window -title "Windows Security | Set_WindowActive | Select-Control -title "Do&n't I&nstall" -recurse | Send-Click

New Post: Windows Security Pop-Up

$
0
0
If the prompt is a security prompt on the other side of UAC, you need to be running PowerShell elevated ("As Administrator") in order to send keys or clicks to that prompt.

New Post: Windows Security Pop-Up

$
0
0
Thanks. I figured that this also depends on the version of Windows we are using. I am trying on Windows 2012 which has different GUI than Windows 2008. So the above commands are working on Windows 2008 however on 2K12 they are not able to recognize the button on prompt.

Let me know if you have some suggestion on this.
Viewing all 129 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>