Member-only story

Work From Home Hack To Keep Screen Active Till You Want

Shweta Lodha
2 min readMar 31, 2022

--

If your boss is very workaholic and you are not working from office then you must have heard one of these statements from your boss:

  • Why were you not at your desk
  • Why your status was away in Teams/Skype/etc
  • I couldn’t see you really putting 8 hours at work, blah blah blah.
source: launchworkplaces.com

And all these statements are coming because your machine was inactive and that change your communicator status to Away.

How can we do that?

Answer is very simple. This problem can be solved, if our machine is active, if we are continuously (or in few mins) pressing some keys or moving our mouse.

Here we will use Python to write just few lines of code to perform this magic.

Python package

We will use Python package named pyautogui as it allows us to automate mouse and keyboard interactions. It works very well on Windows, Mac as well as Linux. You can install this package using pip as shown below:

pip install pyautogui

Code

import pyautogui
import time
while True:
for i in range(0,100):
pyautogui.moveTo(1000,i*10)
time.sleep(5)

--

--

Shweta Lodha
Shweta Lodha

No responses yet