Sign in to follow this  
Followers 0
Stokbroka

Screen Locked WinActive

3 posts in this topic

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

Share this post


Link to post
Share on other sites



Thanks

I will give it a go and let you know if it works.

Share this post


Link to post
Share on other sites

#3 ·  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

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