Jump to content

ControlClick when the desktop locked problem


Recommended Posts

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)!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...