Mouse Mover (Python Script + ScriptKit)

😅 This one is more of a Python script, but I use ScriptKit to launch it. There are moments where I have to leave my computer to address something in another room or need more time than the allotted 10 minutes that Slack provides before it makes it look like I'm unavailable. For the most part, even if I'm in another room, I am still available for conversation/inquiries, so I don't want my coworkers to think I can't be bothered if my status looks like I'm away, but in reality I just might be eating/cooking. So this keeps my computer + work messaging app status in the green so it doesn't look like I'm unavailable.

The Python script requires pyautogui and time modules. I'm not the best for Python troubleshooting as I just learned some Python through YouTube tutorials. All I remember from when I wrote this was that it was a pain to get my computer using the latest version of Python.

From the Python script below, pyautogui lets you exit the script from taking control of your mouse by running ctrl + c or moving your mouse to the top right corner of your screen. Because you can't run ctrl + c into a non-existent terminal when using it through ScriptKit, you need to move your mouse to the top right corner of your monitor to exit.

Note: Before connecting/disconnecting external displays while the script is active, you must exit the script first, otherwise you'll have to reconnect/disconnect your displays to the condition of your computer when you started the script to exit.

You'll have to squint to see the mouse once the script starts + I only run it for three seconds before closing... Sorry about that.

#! /usr/bin/env python3
import pyautogui
import time
while True:
pyautogui.moveRel(0, 50, duration=1.5)
pyautogui.moveRel(0, -50, duration=1.5)
pyautogui.moveRel(50, 0, duration=1.5)
pyautogui.moveRel(-50, 0, duration=1.5)
# You can remove a bunch of the repetition above. I just like seeing the mouse move a lot to know it's working.

Here's the ScriptKit launcher. This will vary depending on your Python path + Python script path.

// Menu: Mouse Mover
// Description: Moves your mouse so you don't go inactive in Slack or Microsoft Teams
// Author: Benjamin Modayil
// Twitter: @24props