Last active
October 8, 2023 21:11
-
-
Save ccjmne/c2ac26ffc34ac2e1a1cbf4718c26506b to your computer and use it in GitHub Desktop.
AutoHotKey script for an equivalent to `keep-presence -cs .1`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Author: Eric NICOLAS (ccjmne) <ccjmne@gmail.com> | |
; Version: 1.0.0 | |
; Repository: https://gist.github.com/ccjmne/c2ac26ffc34ac2e1a1cbf4718c26506b | |
; Description | |
; =========== | |
; Like `keep-presence -cs 1` | |
; Ctrl-Alt-P to toggle on or off | |
; Automatic start-up | |
; ------------------ | |
; Use Ctrl-R and run 'shell:startup' to open your startup directory, then place this script there | |
#Requires AutoHotkey v2.0 | |
#SingleInstance Force | |
#MaxThreadsPerHotkey 2 | |
; Like MouseMove, but works with multiple monitors as well | |
; See https://www.autohotkey.com/boards/viewtopic.php?t=66953 | |
MMove(dx, dy) { | |
CoordMode 'Mouse', 'Screen' | |
MouseGetPos &x, &y | |
DllCall('SetCursorPos', 'int', x + dx, 'int', y + dy) | |
} | |
Global ON := false | |
^!p:: { | |
Global ON := !ON | |
while (ON) { | |
MMove +1, +1 | |
Sleep 100 | |
MMove -1, +1 | |
Sleep 100 | |
MMove -1, -1 | |
Sleep 100 | |
MMove +1, -1 | |
Sleep 100 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment