Sign in to follow this  
Followers 0
YvesDilug

ControlClick and locked computer

7 posts in this topic

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

Share this post


Link to post
Share on other sites



Anyone any input on this?

Share this post


Link to post
Share on other sites

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 :graduated:

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

ControlClick - helpfile

Remarks

Some 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 by Zedna

Share this post


Link to post
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
Sign in to follow this  
Followers 0