YvesDilug Posted November 18, 2010 Share Posted November 18, 2010 Hello all I've got a script running which undertakes action in IE - which works like a charm when the PC is locked. However I'd like to download a list with information and this is where I am getting stuck. This works great when the pc is not locked, but fails otherwise. This works on a not locked pc: WinWait("File Download") WinActivate("File Download") ControlClick("File Download", "","[CLASS:Button; INSTANCE:1]") Trying to get this to work with a handle: WinWait("File Download") $oHandle = WinGetHandle("File Download") ControlClick($oHandle, "","[CLASS:Button; INSTANCE:1]") Unfortunately I am unable to get the above to work, without using WinActivate("File Download"), which does not work when the PC is locked. I should be able to get this to work, while messing in my system - but I'd rather find an AutoIT way of doing this... Thanks in advance Link to comment Share on other sites More sharing options...
YvesDilug Posted November 23, 2010 Author Share Posted November 23, 2010 Bump Link to comment Share on other sites More sharing options...
YvesDilug Posted December 6, 2010 Author Share Posted December 6, 2010 Anyone any input on this? Link to comment Share on other sites More sharing options...
Bert Posted December 6, 2010 Share Posted December 6, 2010 Run your app as a service. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Zedna Posted December 6, 2010 Share Posted December 6, 2010 Look at this http://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
YvesDilug Posted December 6, 2010 Author Share Posted December 6, 2010 Thanks for the reply - I know that not everything works on a locked PC. WinWait("File Download") $oHandle = WinGetHandle("File Download") ;~ WinActivate("File Download") ControlClick($oHandle, "","[CLASS:Button; INSTANCE:1]") From the article: "Instead use ControlSend() ControlSetText() ControlClick() WinWait()". Unfortunately this still does not work, even with the PC unlocked... I throw in the WinActivate and it is fine, but then obviously it won't work with a locked PC Link to comment Share on other sites More sharing options...
Zedna Posted December 6, 2010 Share Posted December 6, 2010 (edited) ControlClick - helpfileRemarksSome controls will resist clicking unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlClick().If it's your case then it's probably not possible to automate such controls from locked station Edited December 6, 2010 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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