From 551b0aaf5ac2d1f624a44c75bc2c07399a480c9f Mon Sep 17 00:00:00 2001 From: Elizabeth Cray Date: Mon, 10 Jul 2023 02:53:12 -0400 Subject: [PATCH] AutoHotKey Scripts --- Cray Menu.ahk | 69 +++++++++++++++++++++++++++++++++++++++++++ Shortcut Listener.ahk | 5 ++++ 2 files changed, 74 insertions(+) create mode 100644 Cray Menu.ahk create mode 100644 Shortcut Listener.ahk diff --git a/Cray Menu.ahk b/Cray Menu.ahk new file mode 100644 index 0000000..3cf4fc8 --- /dev/null +++ b/Cray Menu.ahk @@ -0,0 +1,69 @@ +#SingleInstance Force + +Gui, Color, D8DEE9 +Gui, Font, s18, Arial +ButtonSize := 100 +Margins := 5 +Gui, Add, Button, x%Margins% y%Margins% w%ButtonSize% h%ButtonSize% gqqpyp, Alice +Gui, Add, Button, x+%Margins% yp w%ButtonSize% h%ButtonSize% gnymez, Abby +Gui, Add, Button, x+%Margins% yp w%ButtonSize% h%ButtonSize% gjevyy, Astoria +Gui, Add, Button, x%Margins% y+%Margins% w%ButtonSize% h%ButtonSize% giirsl, Belle +Gui, Add, Button, x+%Margins% yp w%ButtonSize% h%ButtonSize% gsphkc, Victoria +Gui, Add, Button, x+%Margins% yp w%ButtonSize% h%ButtonSize% gojhto, Soupy +GUIHeight := 3*Margins + 2*ButtonSize +GUIWidth := 4*Margins + 3*ButtonSize +Gui, Show, w%GUIWidth% h%GUIHeight%, Cray Switcher 3000 +Return + +Switcher(id) +{ + reqlf := ComObjCreate("WinHttp.WinHttpRequest.5.1") + reqlf.open("POST", "https://plural.cray.gay/", 0) + reqlf.setRequestHeader("Content-Type", "application/json") + reqlf.send("{""members"":[""" id """],""token"":""API_KEY_HERE"",""debug"":false}") + reqlf.WaitForResponse() + ; return reqlf.ResponseText + ExitApp +} + +; [nymez] Abby +nymez: + Switcher("nymez") +Return + +; [jevyy] Astoria +jevyy: + Switcher("jevyy") +Return + +; [iirsl] Belle +iirsl: + Switcher("iirsl") +Return + +; [qqpyp] Alice +qqpyp: + Switcher("qqpyp") +Return + +; [ojhto] Soup +ojhto: + Switcher("ojhto") +Return + +; [sphkc] Victoria +sphkc: + Switcher("sphkc") +Return + +Esc:: + ExitApp +Return + +Ctrl & C:: + ExitApp +Return + +GuiClose: + ExitApp +Return diff --git a/Shortcut Listener.ahk b/Shortcut Listener.ahk new file mode 100644 index 0000000..f9de7f7 --- /dev/null +++ b/Shortcut Listener.ahk @@ -0,0 +1,5 @@ +#SingleInstance Force + +^+/:: +Run C:\Users\liz\Documents\Cray Menu.ahk +return