x001z Posted January 28, 2011 Share Posted January 28, 2011 Hi All!! Well here is my problem. I'm trying to download a file from the IE8, but this file is generated by a java script, so there is no a direct link to the file(can't use inetget). Using the <IE.au3> click the "export" button that generated the file and then appear the "File Download" window to save the file, what I'm trying to do is to click the "save" button when the computer is locked, So far I'm been playing with ControlFocus, ControlSend, ControlClick, that works when the windows is active but not when the computer is locked, or the window is not active. #include <IE.au3> _IELoadWait($oIE) _IELoadWait($oFrameF3) _IELoadWait($oForm) $oIE = _IEAttach("***") _IELoadWait($oIE) $oFrameF3 = _IEFrameGetObjByName($oIE, "f3") $oForm = _IEFormGetObjByName($oFrameF3,"statusForm") $oTableF3 = _IETableGetCollection($oForm,1) $oBtnExport = _IEGetObjByName ($oTableF3, "button_text_export") _IEAction($oBtnExport,"focus") $oBtnExport.click WinWait("File Download") ;~ ControlFocus("File Download","","[CLASS:Button; INSTANCE:2]") ;~ ControlSend("File Download","","[CLASS:Button; INSTANCE:2]","{space}") ;~ ControlFocus("File Download","","[CLASS:Button; INSTANCE:2]") ;~ ControlSend("File Download","","[CLASS:Button; INSTANCE:2]","{Enter}") ;~ ControlFocus("File Download","","Button2") ;~ ControlSend("File Download","","Button2","{Enter}") ;~ ControlClick("File Download","","[CLASS:Button; INSTANCE:2]") ;~ ControlClick("File Download","","Button2") ;~ ControlSend("File Download","","[CLASS:Button; INSTANCE:2]","{LEFT}") ;~ ControlSend("File Download","","[CLASS:Button; INSTANCE:2]","{SPACE}") The commented lines are the lines I'm have been playing with but none of that works. Is there any way to send a key/command when WindowsXP is lock??. Thanks in Advance!! Link to comment Share on other sites More sharing options...
Zedna Posted January 30, 2011 Share Posted January 30, 2011 (edited) There is FAQ about scripts & locked stationshttp://www.autoitscript.com/wiki/FAQ#Why...y_script_work_on_a_locked_workBut I see no logical mistake in your script so that's strange it's not working.This should workControlFocus("File Download","","Button2")ControlClick("File Download","","Button2")Note: In fact ControlFocus has no meaning here because it can't have focus on locked station Edited January 30, 2011 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
x001z Posted January 31, 2011 Author Share Posted January 31, 2011 There is FAQ about scripts & locked stationshttp://www.autoitscript.com/wiki/FAQ#Why...y_script_work_on_a_locked_workBut I see no logical mistake in your script so that's strange it's not working.This should workNote: In fact ControlFocus has no meaning here because it can't have focus on locked stationThanks for the reply, I've read that FAQ before, that's way I use the "Control...", but the response it's really appreciated, the weird thing it's that is working on other windows, but not in this particularly.If you come up with something else, it will be nice to hear about it.Thanks for the Help.PSSorry about my bad English, I'm doing my best. jeje. Link to comment Share on other sites More sharing options...
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