Skip to content

Instantly share code, notes, and snippets.

@dahoba
Last active October 19, 2023 02:44
Show Gist options
  • Save dahoba/f3c5ad3805ca4b7734a65309486d295d to your computer and use it in GitHub Desktop.
Save dahoba/f3c5ad3805ca4b7734a65309486d295d to your computer and use it in GitHub Desktop.
my autohotkey
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Capslock::
Send, {LShift down}{LAlt down}{LShift Up}{LAlt Up}
;Send, {Shift Down}{Alt Down}{Alt Up}{Shift Up}
;SoundBeep 999, 1
Return
#MaxHotkeysPerInterval 200
WheelUp::
Send {WheelDown}
Return
WheelDown::
Send {WheelUp}
Return
PrintScreen::Send #+s
; cycle through all the windows of the active process
!`::
WinGetClass, OldClass, A
WinGet, ActiveProcessName, ProcessName, A
WinGet, WinClassCount, Count, ahk_exe %ActiveProcessName%
IF WinClassCount = 1
Return
loop, 2 {
WinSet, Bottom,, A
WinActivate, ahk_exe %ActiveProcessName%
WinGetClass, NewClass, A
if (OldClass <> "CabinetWClass" or NewClass = "CabinetWClass")
break
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment