Jump to content
Sign in to follow this  
beb7089

Detecting Locked vs. Unlocked

Recommended Posts

beb7089

Is there any method to detect whether a machine is locked vs. unlocked? As most everyone knows, if a script executes and that script requires window manipulations the script will fail to run correctly. I would like to place something at the begining of a script to detect the current state (locked vs. unlocked) and if the machine is locked the script would simply wait until the machine is unlocked and then continue processing the script.

Thanks.

Share this post


Link to post
Share on other sites
herewasplato

Perhaps this will work for you:

Do
    WinActivate("Program Manager","")
Until WinWaitActive("Program Manager","",1)
It will not max out the CPU while waiting...


[size="1"][font="Arial"].[u].[/u][/font][/size]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.