Member-only story

Use This Witty Python Script to keep you active on Skype, Slack & MS Teams

Dhaval Thakur
1 min readJan 3, 2023

--

We all know that we want to show our managers, bosses that we are active on our system, but darn it! Applications like Skype, Slack and MS Teams status feature keeps you active if you move your mouse around :(

Automating your cursor movements on IM Applications (Image Credits: Zapier)

But worry not! Today I am going to share with you two good programming ways to get away with these annoying IM statuses so that you can chill like a pro! (or work without any questions being asked)

Python Script to keep you active on Skype , MS Team & Slack

import pyautogui
import time
import sys
from datetime import datetime
pyautogui.FAILSAFE = False
numMin = None
if ((len(sys.argv)<2) or sys.argv[1].isalpha() or int(sys.argv[1])<1):
numMin = 3
else:
numMin = int(sys.argv[1])
while(True):
x=0
while(x<numMin):
time.sleep(60)
x+=1
for i in range(0,200):
pyautogui.moveTo(0,i*4)
pyautogui.moveTo(1,1)
for i in range(0,3):
pyautogui.press("shift")
print("Movement made at {}".format(datetime.now().time()))

Power Shell command to do the same thing

Add-Type -assemblyName System.Windows.Forms;$a=@(1..100);while(1){[System.Windows.Forms.Cursor]::Position=New-Object System.Drawing.Point(($a|get-random),($a|get-random));start-sleep -seconds 5}

I hope these two code snippets help you in your workplace ;)

--

--

Dhaval Thakur
Dhaval Thakur

Written by Dhaval Thakur

Data Enthusiast, Geek, part — time blogger. Every week 1 new Data Science/ Product Management story 🖥 I also write on Python, scripting & blockchain

No responses yet