====== AutoHotKey ======
Für Windows 10 Pro x64 den Installer [[https://autohotkey.com/|herunterladen]] und bei der "Custom-Installation" die "Unicode x64"-Version installieren.
Die .ahk-Datei im Autostart-Ordner ''%appdata%\Microsoft\Windows\Start Menu\Programs\Startup'' ablegen, sodass bei jedem Systemstart das AHK-Skript aktiv ist.
* [[https://autohotkey.com/docs/Hotkeys.htm|AutoHotKey Docs]]
* [[https://autohotkey.com/docs/Hotkeys.htm#Symbols|AutoHotKey Docs: Hotkey Modifier Symbols]]
===== Nützliche Skripte =====
==== Windows 10: Virtuelle Desktops wechseln ====
; angenehmere Shortcuts um in Windows 10 die Desktops zu verwalten
; Strg+Win+A (links)
^#a::^#Left
Return
;Strg+Win+S (rechts)
^#s::^#Right
Return
;Strg+Win+W (schliessen)
^#w::^#F4
Return
==== F1 drücken bewirkt F2 ====
; beim Druecken von F1 wird tatsaechlich F2 ausgefuehrt
F1::F2
Return
==== Tastenkombination startet Programm ====
; das Such-Programm "Everything" mit Windows+S starten
#s:: {
Run("%ProgramFiles%\Everything\Everything.exe")
}
Everything wurde in der Standardinstallation als Service installiert (Optionen im Installationsdialog wie vorgegeben auswählt lassen).
==== Mausrad kippen um Übersicht der Fenster aufzurufen / zum letzten Fenster wechseln ====
; Mausrad links/rechts kippen auf "Alt+Tab" und "Win+Tab" setzen
WheelLeft::
Send !{Tab}
Return
WheelRight::
Send #{Tab}
Return
AHK v2-kompatibler Code:
; Mausrad links/rechts kippen auf "Alt+Tab" und "Win+Tab" setzen
isWheelLeftOnCooldown := false
WheelLeft::
{
global isWheelLeftOnCooldown
if isWheelLeftOnCooldown
return
isWheelLeftOnCooldown := true
Send('!{Tab}') ; Alt + Tab
;SoundBeep(2000, 100) ; Debug-Sound: 1000 Hz für 100 ms
SetTimer(() => isWheelLeftOnCooldown := false, -500) ; 500 ms Sperre
}
lastWheelRightTime := 0
WheelRight::
{
global lastWheelRightTime
currentTime := A_TickCount
if (currentTime - lastWheelRightTime < 500)
return
lastWheelRightTime := currentTime
Send('#{Tab}') ; Win + Tab
}