Jump to content

Recommended Posts

Posted

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

  • 2 weeks later...
Posted

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:

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

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
×
×
  • Create New...