Answer the question
In order to leave comments, you need to log in
How to end a process on mouse movement?
I do synchronization between the server and the PC, but the PC is very weak, not only I use it, the synchronization itself via rsync is configured on Windows, during synchronization the computer just dies, it is necessary to make sure that when the user is working, there is nothing to interfere with,
so far I have come up with just killing everything superfluous at work, but how to do it? For example, 1 minute of inactivity and start synchronization, move the mouse and complete the process, wait 2-3 minutes and loop
in Google, I can’t find something, tell me which way to look, thanks
Answer the question
In order to leave comments, you need to log in
The first thing that comes to mind is to create your own screen saver, which will run when idle and will be a separate process to start synchronization. When you move the mouse, the screen saver will close along the way, killing the synchronization process.
This can be done through AutoIT. Get mouse coordinates. in a minute we check with the new ones. if they are equal, then the user is inactive. We start the process. and then check the coordinates of the mouse.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question