Jump to content

Recommended Posts

Posted

Hi People

I have a script that I use and it works perfectly when the screen is not locked. Soon as I lock the screen it stops working. Can I get around this somehow. I have pasted the part of the script that is failing. Any help would be appreciated.

Func RunCheck()

If ProcessExists($EXE_01) Then

WinActivate("My Window", "")

If WinActive("My Window") Then

ControlClick("My Window", "OK", 2)

EndIf

Else

MsgBox(0, "Process Checker", "Process Does Not Exist", 10)

EndIf

EndFunc

Posted (edited)

Hi

That didnt seem to work. Here is the whole original script. Maybe you can see what I am doing wrong, or I might not have given you enough info the first time.

Global Const $EXE_01 = "My.EXE"

Global Const $TEN_SECONDS = 1 * 1000 * 10 ;1 x 1000 = SECS x 10 = 10 SECS

AdlibEnable("RunCheck", $TEN_SECONDS)

While 1

Sleep(10000)

WEnd

Func RunCheck()

If ProcessExists($EXE_01) Then

WinActivate("My Window", "")

If WinActive("My Window") Then

ControlClick("My Window", "OK", 2)

EndIf

WinActivate("My Window 2", "")

If WinActive("My Window 2", "") Then

ControlClick("My Window 2", "START", 7)

EndIf

Else

MsgBox(0, "Process Checker", "Process Does Not Exist", 10)

EndIf

EndFunc

Func ExitModule()

Exit

EndFunc

BTW, thanks for your help.

Edited by Stokbroka

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...