-1

I am trying to Keep unloack the screen of windows server, have used mousemove() and below code , but its running only for 20 minutes and syestem gets locked again.

Code- autoIt.mouseMove(300, 20, 0); autoIt.mouseMove(700, 20, 0);

  • 5
    Why do you want to do that? As Admin, I'd kick any developer doing something like that in the balls. Seriously. If you need to keep the Screen unlocked, make the appropriate settings in windows. If your Admin sais you are not allowed to then you need to find a whole different solution anyway. *I consider this a security threat*. – Fildor Feb 02 '17 at 09:45
  • As Fildor said, there is very little reason to do this and provides an incredible security threat. Seriously consider why you feel the need to do this. – Takarii Feb 02 '17 at 11:27
  • i wants to automate one application ,which takes 1-2 hrs to complete , upto that time screen gets locked and cant automate further things.also we cant keep server unlocked because of some security reasons so wants to automate through my java code – ashvini Feb 03 '17 at 05:48

1 Answers1

0

To answer your question; it will work if make the mouse move slower and not "teleport" it with speed 0. Change the speed from 0 to 10.

But as others have commented, this script is not a bad method for what you would like use it for.

Cealeth
  • 61
  • 3
  • i wants to automate one application ,which takes 1-2 hrs to complete , upto that time screen gets locked and cant automate further things.also we cant keep server unlocked because of some security reasons so wants to automate through my java code – ashvini Feb 03 '17 at 05:48