YvesDilug Posted November 18, 2010 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
Bert Posted December 6, 2010 Posted December 6, 2010 Run your app as a service. The Vollatran project My blog: http://www.vollysinterestingshit.com/
Zedna Posted December 6, 2010 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
YvesDilug Posted December 6, 2010 Author 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
Zedna Posted December 6, 2010 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
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