Jump to content

Recommended Posts

Posted

Hi,

I have a script that works on XP but needs to be moved to Windows 2003 Server.

My script downloads a file from a website, and fails at this line on Windows 2003 Server:

ControlSend("File download","","[CLASS:Button; INSTANCE:2]","{Enter}")

On XP, that command causes the 'Save' button be clicked and the file to download but on Windows 2003 Server

it causes the window to close, as if the 'Cancel' button had been clicked.

I have tried many variations and other commands but none succeeds in getting the file to save.

ConrolClick won't work on the 'File Download' window on either OS.

Can someone please help me to get the download working?

thanks very much,

Elaine

Posted

This is very interesting.

It seems that you cannot control that window properly using Controlsend or controlclick.

I even disabled all the buttons except save and still nothing.

Your best bet is to use Winactivate() & normal Send().

It's not ideal, but it works...

Opt("Wintitlematchmode",2)

WinActivate("File Download")
WinWaitActive("File Download")
Send("s")
Posted

Dear Hawky358,

Thanks very much for finding a way to make it work. I am surprised the "s" works. I had tried "^s" and "!s", thinking it needed a Ctrl or ALT but they didn't work, while just plain "s" worked.

Elaine

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...