Skip to content

Instantly share code, notes, and snippets.

@zero-plusplus
zero-plusplus / KillAllAutoHotkey.ahk
Last active June 9, 2022 10:20
Terminates all currently running AutoHotkey scripts, including itself.
/**
* @author zero-plusplus (https://github.com/zero-plusplus)
* @licence MIT
* @link https://gist.github.com/zero-plusplus/23af37abef8eb126ae665f7e8174ba41
*/
/**
* Terminates all currently running AutoHotkey scripts, including itself.
* @param {boolean} [excludeSelf := false] - Excludes the current script from processing
*/
KillAllAutoHotkey(excludeSelf := false) {
@zero-plusplus
zero-plusplus / WindowChangeEvent.ahk
Last active May 14, 2022 14:51
This class provides methods to register/unregister window change event.
/**
* @author zero-plusplus (https://github.com/zero-plusplus)
* @licence MIT
* @link https://gist.github.com/zero-plusplus/88b4407e3a939233315a1e2e2fffd464
*/
/**
* Provides a way to register or unregister window change event.
* @example
* ; Always change to pseudo full screen when notepad is active
* WindowChangeEvent.register(Func("eventCallback"))
@zero-plusplus
zero-plusplus / Ime.ahk
Last active May 2, 2022 10:33
The class provides a way to get/set the state of IME that work with AutoHotkey v1 or v2.
/**
* @author zero-plusplus (https://github.com/zero-plusplus)
* @licence MIT
* @link https://gist.github.com/zero-plusplus/ad54d19d3e0d34587396c4667fa10079
*/
/**
* This class provides static methods for getting/setting the state of the [Input Method Editor (IME)](https://en.wikipedia.org/wiki/Input_method).
*/
class Ime {
/**
@zero-plusplus
zero-plusplus / SetPseudoFullScreen.ahk
Last active April 29, 2022 01:40
Function that works with AutoHotkey v1 or v2 to set a window to pseudo fullscreen.
/**
* @author zero-plusplus (https://github.com/zero-plusplus)
* @licence MIT
* @link https://gist.github.com/zero-plusplus/89b5278de42d903ce2abf53e4da5433b
*/
/**
* !!!! CAUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* This function is intended for use in single games without an anti-cheat system.
* AutoHotkey may be treated as a cheat by anti-cheat systems and may result in a ban in the worst case. Never use it.
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@zero-plusplus
zero-plusplus / SuppressErrorDialog.ahk
Last active November 25, 2023 14:09
Suppresses run-time error dialogs and outputs more detailed information to standard output.
/**
* @licence MIT <http://opensource.org/licenses/mit-license.php>
* @auther zero-plusplus
* @link https://gist.github.com/zero-plusplus/107d88903f8cb869d3a1600db51b7b0a
*/
#ErrorStdOut, UTF-8
/**
* Suppresses run-time error dialogs and instead outputs their contents to standard output.
*
* @param {boolean} [enable := true]
@zero-plusplus
zero-plusplus / fixpagetranslate.js
Last active November 6, 2021 09:51
For Tampermonkey
// ==UserScript==
// @name fixpagetranslate
// @namespace
// @author zero-plusplus
// @include https://*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// ==/UserScript==
(function() {
let initedProcessing = false;
setTimeout(() => {