godzillarama Posted April 7, 2010 Share Posted April 7, 2010 Greetings. My script is designed to run in the background and provide users with a variety of keyboard shortcuts for a specific application that does not have such shortcuts. I provide the users this script as an EXE. But when a user needs to leave their desk, they lock their workstation with ALT-CTRL-DEL. This crashes my script. It's still visible in the System Tray, but it no longer works. And it isn't "paused" - it's just dead in the water. It has to be exited via the System Tray and restarted. Using Win-L to lock the workstation causes the same problem. I'm thinking this will happen to any script - correct? Is there a way to avoid it? I'd appreciate any advice. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted April 7, 2010 Share Posted April 7, 2010 What are you talking about? Nothing happens with scripts when the comp is locked. It's all in your code if something really happen. Post a small runnable (working) reproducer so we know what you're talking about. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
godzillarama Posted April 7, 2010 Author Share Posted April 7, 2010 Thanks, I cut my script down to a bare minimum and it does not, in fact, stop when the workstation is locked. Now I need to add back in until I find the culprit. Link to comment Share on other sites More sharing options...
IndyUK Posted April 7, 2010 Share Posted April 7, 2010 In a nutshell, Windows suspends all GUI/Keyboard/Mouse activity when a workstation is locked. I've had this issue with all scripts that need to manipulate any GUI. My only workaround has been to run the script in a remote session and lock the workstation. This way the remote session is still being processed while the workstation is securely locked. If you are running a script on a user's workstation then maybe you can devise a method of checking the PC state. Then you suspend your script if the workstation locked and resume once available. I think somewhere in this forum lies a script that can check if a workstation is locked...you just need to find it. Good luck. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now