Jump to content

Recommended Posts

Posted

I have read several threads about this and nothing seems to be successful...

WinWait("File Download")

Sleep (400)

WinExists("File Download")

sleep (400)

ControlClick("File Download", "Do you want to save this file, or find a program online to open it?", "&Save")

sleep (400)

WinExists("Save As")

ControlClick("Save As" , "" , "&Save")

sleep (400)

ControlClick("Save As" , "" , "&Yes")

WinExists("Download complete")

Sleep (400)

ControlClick("Download complete" , "", "Close")

I have the whole code compiled as an EXEwhen I log back in the File Download window is open.... it's not handling it.

Posted (edited)

Thanks John,

I thought I did write code that works while locked by using the ControlClick command... While locked it doesn't seem to be finding the File Download window... is it just going too fast and WinWait isn't working while it is locked?

Edited by drpatso
Posted (edited)

I did just discover the original "click" doesn't actually push the button while locked since the window is not active, it just highlights the save buton..... it's similar to if you are logged in and you click save and the window is not active, it just highlights the save button and makes the window active...

Edited by drpatso
Posted

ah crap, thanks John that makes sense. It is an IE file download popup, probably has loads of security measures to not allow input while window is not active like you say... Maybe I would have better luck with firefox.

Posted

nah, it's a jreports type CSV.. I need to be logged in and it uses a session ID and creates the file. It gets to a page and continues to refresh until the server has it ready then the file download finally pops up...

Posted

I solved this by just having a windows 7 virtual machine on our esxi server that never logs out... silly to troubleshoot scripts while logged out, with VMs being so easy.

Posted

Other way would be downloading directly by command without controlling any windows.

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...