Jump to content
Sign in to follow this  
lsakizada

ControlClick when the desktop locked problem

Recommended Posts

lsakizada

I have an au3 program that need to be restarted frequently.

After the application restarted the ControlClick is issuing the click command on a button.

The problem is that when the desktop is locked then the ControlClick does not working.

I have tried the code bellow, but the ControlClick is still not sending the click command.

What to do?

If IniRead(@ScriptDir & "\" & "config.ini", "SET", "isLaunch", "0") = 1 Then
    If Not WinActive($AppName, "") Then WinActivate($AppName, "")
    WinWaitActive($AppName, "")
    ControlFocus ( "", "", $Monitor )
    ControlClick("", "", $Monitor)
EndIf

BTW: It is possible to detect that the desktop is locked but i do not know how to benefit from that.

here is the link to Gary Frost code of detecting locked computer.


Be Green Now or Never (BGNN)!

Share this post


Link to post
Share on other sites
lsakizada

Look here

I am not quiet understood the solution.

can you please clarify?

Edited by lsakizada

Be Green Now or Never (BGNN)!

Share this post


Link to post
Share on other sites
Zedna

Try:

If IniRead(@ScriptDir & "\" & "config.ini", "SET", "isLaunch", "0") = 1 Then
      ControlFocus ( $AppName, "", $Monitor )
      ControlClick($AppName, "", $Monitor)
EndIf

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  

×