Usage and information: https://redd.it/orzend
- [example.ahk]
- [Spotify.ahk]
; Version: 2021.11.14.1 | |
TrayRefresh() | |
{ | |
dhw := A_DetectHiddenWindows | |
DetectHiddenWindows On | |
TrayRefresh_Clear("Shell_TrayWnd", 323) | |
; For hidden icons: | |
; TrayRefresh_Clear("NotifyIconOverflowWindow", 321) |
| |
; Version: 2022.07.01.1 | |
; Usages and examples: https://redd.it/qplxwo | |
Alert(Options := 0, Title := "", Message := "", Spec := "") | |
{ | |
if !(Options ~= "i)^(0x)?\d+") { | |
Message := Options | |
Options := Title := Spec := "" | |
} |
| |
; Version: 2023.05.17.1 | |
; https://gist.github.com/cd70e009792fc2eb866f9f5caf1e395a | |
/* | |
Message.Listen(Callback) ; Listen | |
Message.Listen() ; Stop listening | |
Message.Send(Message, Target[, Timeout := 7000ms]) | |
ErrorLevel | |
-1 = Target not found |
#Requires AutoHotkey v2.0 | |
; Version: 2023.09.22.1 | |
; https://gist.github.com/58d2b141be2608a2f7d03a982e552a71 | |
; Private | |
Acc_Init(Function) { | |
static hModule := DllCall("LoadLibrary", "Str", "oleacc.dll", "Ptr") | |
return DllCall("GetProcAddress", "Ptr", hModule, "AStr", Function, "Ptr") | |
} |
; Version: 2022.07.01.1 | |
; https://gist.github.com/da81e29517b0ba6dd552f7c6439be032 | |
/* Virtual/Scan Codes & Key Names | |
Uses a keyboard hook to provide all information of a key pressed. | |
The idea of the Gui is from SKAN, however his script fails to detect some keys and other info | |
https://autohotkey.com/board/topic/21105-crazy-scripting-scriptlet-to-find-scancode-of-a-key/ |
| |
; Version: 2023.01.19.1 | |
; Usage and examples: https://redd.it/pap3c1 | |
;@Ahk2Exe-IgnoreBegin | |
d(Arguments*) { | |
static gcl := DllCall("GetCommandLine", "Str") | |
if (IsObject(Arguments[1])) { | |
out := d_Recurse(Arguments[1], 1) | |
} else { |
| |
; Version: 2022.11.17.1 | |
; Usage and examples: https://redd.it/owgn3j | |
Volume(Offset) { | |
hWnd := DllCall("FindWindowA", "AStr","NativeHWNDHost", "Ptr",0) | |
DetectHiddenWindows On | |
PostMessage 0xC028, 0x0C, 0xA0000,, % "ahk_id" hWnd | |
SoundSet % Format("{:+d}", Offset) | |
} |
| |
; Version: 2022.11.17.1 | |
; Usage and examples: https://redd.it/owgn3j | |
Brightness(Offset) { | |
static last := "" | |
wmi := ComObjGet("winmgmts:\\.\root\WMI") | |
if (last = "") { | |
last := wmi.ExecQuery("SELECT * FROM WmiMonitorBrightness") | |
.ItemIndex(0) |
Usage and information: https://redd.it/orzend
About: https://redd.it/orzend
Example with dependencies: Spotify_Keys.ahk.zip