You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! so what might be happening is that your mouse is hitting the bottom right corner of the screen (which is a failsafe in PyAutoGui to stop the code if the mouse moves to a corner of the screen).
Possible fix would be to add a py.moveRel(-5,-10) inside the while loop.
Also, the exact Windows sleep settings of your machine will change the outcome, so double check those as well.
I can confirm that PYAutoGui failsafe is not the reason why it is not working! As you can see the mouse is moving every 5 minutes only 10 and 5 pixels and it did defintely not hit any corner of the screen in that time. And after 5 minutes monitor turns off. As I mentioned, with Autohotkey I have no problems. I really want to understand why it´s not workig in PyAutoGui because I can see the mouse is moving, but it seems to be not recogised by windows!
Hi,
I used AutoHotKey and the function mousemove() for a while. With hthis code, my windows did not lock and MS Teams e.g. showed me as active:
Loop{ MouseMove, 10, 5, ,R sleep 300000 }
I tried to reproduce this with pyautogui and this code:
`import pyautogui as py
import time
while True:
py.moveRel(5,10)
time.sleep(300)`
I see the mouse moving, but MS Teams shows me as inactive after 5 minutes and after 10 minuters my monitor turns off.
So what´s wrong here?
The text was updated successfully, but these errors were encountered: