Jump to content

handle file download while workstation locked


drpatso
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

What exactly do you think this line will do?

WinExists("File Download")

you do not test it in any fashion.

Are you saying that the code you provided works stable while the workstation is not locked?

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

I can only assume then that the window needs to be active to accept input, and that is something you cannot achieve on a locked workstation.

You should add some debugging to see exactly where it is faulting, few consolewrites ought to do it.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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