Sign in to follow this  
Followers 0
razormoon

Detect screensaver or locked computer on Vista

1 post in this topic

I've Googled this forever and got the halfest assed answers. Especially under Vista (screensaver process)...

Detect PC is locked:

If ProcessExists("logonui.exe") then

'PC IS LOCKED!

EndIf

Detect Screensaver: (Under Vista)

$CurrentProcesses = ProcessList()

For $WhereTheF = 1 to $CurrentProcesses[0][0]

$CHRPos = StringInStr($CurrentProcesses[$WhereTheF][0], ".", 0, -1)

$ProcessEXT = StringMid($CurrentProcesses[$WhereTheF][0], $ChrPos + 1, StringLen($CurrentProcesses[$WhereTheF][0] - $CHRPos)

If $ProcessEXT = "SCR"

'HERE IS YOUR SCREENSAVER!'

EndIf

Next

Enjoy!

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