Script Kit Logo
Script Kit
by John Lindquist
Browse ScriptsBlogDiscuss
Benjamin Modayil
Scripts /

Benjamin Modayil

modayilme

mouse-mover-python-script-scriptkit

by Benjamin Modayil

#! /usr/bin/env python3
import pyautogui
import time
while True:
pyautogui.moveRel(0, 50, duration=1.5)
time.sleep(1)
pyautogui.moveRel(0, -50, duration=1.5)
time.sleep(1)
pyautogui.moveRel(50, 0, duration=1.5)
time.sleep(1)
pyautogui.moveRel(-50, 0, duration=1.5)
time.sleep(1)
# You can remove a bunch of the repetition above. I just like seeing the mouse move a lot to know it's working.
// Menu: Mouse Mover
// Description: Moves your mouse so you don't go inactive in Slack or Microsoft Teams
// Author: Benjamin Modayil
// Twitter: @24props
await exec(`/PATH-TO-PYTHON-EXECUTABLE/python3.9 /PATH-TO-SCRIPT/i-am-here.py`)

generate-ts-interfaces-from-json-input

by Benjamin Modayil

// Title: Generate types
// Description: Paste your JSON in and get your Interfaces straight to your clipboard
// Author: Benjamin Modayil
// Twitter: @24props
let {json2ts} = await npm('json-ts')
let schema = await arg("What is the schema?");
await copy(`${json2ts(schema)}`)
notify({
title: 'Interfaces copied to the clipboard',
message: "Paste your interfaces into a text editor"
})
exit() // needed otherwise scriptkit hangs open
interface IRootObject {
count: number;
next: string;
previous: null;
results: IResultsItem[];
}
interface IResultsItem {
name: string;
url: string;
}
created by
John Lindquist
GitHub