drpatso Posted February 10, 2013 Posted February 10, 2013 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.
JohnOne Posted February 10, 2013 Posted February 10, 2013 Write some code that can do it when the workstation is not locked first, I doubt that will, up there. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
drpatso Posted February 10, 2013 Author Posted February 10, 2013 (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 February 10, 2013 by drpatso
JohnOne Posted February 10, 2013 Posted February 10, 2013 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.
drpatso Posted February 10, 2013 Author Posted February 10, 2013 ya, it does work well, and the script will pause until File Download pops up.... You're right I probably don't need the WinExists..
drpatso Posted February 10, 2013 Author Posted February 10, 2013 (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 February 10, 2013 by drpatso
JohnOne Posted February 10, 2013 Posted February 10, 2013 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.
drpatso Posted February 10, 2013 Author Posted February 10, 2013 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.
JohnOne Posted February 10, 2013 Posted February 10, 2013 Are there not ant direct links to the file you could snatch and just download using Inet* functions? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
drpatso Posted February 10, 2013 Author Posted February 10, 2013 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...
drpatso Posted February 15, 2013 Author Posted February 15, 2013 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.
JohnOne Posted February 15, 2013 Posted February 15, 2013 good workaround. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Xenobiologist Posted February 15, 2013 Posted February 15, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now