programmieren:autohotkey
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| programmieren:autohotkey [2023/03/26 12:53] – [Fenster positionieren und in Größe ändern (Windows 7)] felix | programmieren:autohotkey [2025/10/30 17:21] (current) – [Mausrad kippen um Übersicht der Fenster aufzurufen / zum letzten Fenster wechseln] felix | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| ===== Nützliche Skripte ===== | ===== Nützliche Skripte ===== | ||
| ==== Windows 10: Virtuelle Desktops wechseln ==== | ==== Windows 10: Virtuelle Desktops wechseln ==== | ||
| - | <file autohotkey | + | <code autohotkey> |
| ; angenehmere Shortcuts um in Windows 10 die Desktops zu verwalten | ; angenehmere Shortcuts um in Windows 10 die Desktops zu verwalten | ||
| ; Strg+Win+A (links) | ; Strg+Win+A (links) | ||
| Line 22: | Line 22: | ||
| ^#w::^#F4 | ^#w::^#F4 | ||
| Return | Return | ||
| - | </file> | + | </code> |
| Line 32: | Line 32: | ||
| </ | </ | ||
| - | ==== Einfg drücken bewirkt Ende ==== | + | |
| - | <code autohotkey> | + | |
| - | ; beim Druecken von Einfg wird tatsaechlich Ende ausgefuehrt | + | |
| - | Insert:: | + | |
| - | Return | + | |
| - | </ | + | |
| ==== Tastenkombination startet Programm ==== | ==== Tastenkombination startet Programm ==== | ||
| <code autohotkey> | <code autohotkey> | ||
| ; das Such-Programm " | ; das Such-Programm " | ||
| - | #s:: | + | #s:: { |
| - | Run, %ProgramFiles%\Everything\Everything.exe | + | Run("%ProgramFiles%\Everything\Everything.exe") |
| - | Return | + | } |
| </ | </ | ||
| Everything wurde in der Standardinstallation als Service installiert (Optionen im Installationsdialog wie vorgegeben auswählt lassen). | 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 ==== | ||
| <code autohotkey> | <code autohotkey> | ||
| - | #c:: | + | ; Mausrad links/ |
| - | Run, C:\Apps\cmder\Cmder.exe | + | WheelLeft:: |
| + | Send !{Tab} | ||
| + | Return | ||
| + | |||
| + | WheelRight:: | ||
| + | Send #{Tab} | ||
| Return | Return | ||
| </ | </ | ||
| - | ==== Fenster positionieren und in Größe ändern (Windows 10) ==== | + | AHK v2-kompatibler Code: |
| <code autohotkey> | <code autohotkey> | ||
| - | # | + | ; Mausrad links/ |
| - | ; #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% | + | |
| + | isWheelLeftOnCooldown := false | ||
| - | ; ==== Windows 10 Besonderheit ==== | + | WheelLeft:: |
| - | ; Variablen funktionieren hier nicht! - aber mit festen Zahlen gehts! | + | { |
| - | ;windowx:=10 | + | |
| - | ;windowy:=0 | + | |
| - | ; | + | |
| - | ; | + | |
| - | ^!a:: | + | if isWheelLeftOnCooldown |
| - | WinGetActiveTitle, | + | return |
| - | WinActivate, | + | |
| - | WinRestore, | + | |
| - | Sleep, 200 | + | |
| - | ;WinMove, %Title%, , windowx, windowy, windoww, windowh | + | |
| - | ; Zielgroesse des Fensters: 1280x780 | + | |
| - | WinMove, %Title%, , , , 1294, 787 | + | |
| - | return | + | |
| - | </ | + | |
| - | ==== Mausrad kippen um ganz runter zu scrollen ==== | + | |
| - | <code autohotkey> | + | |
| - | ; Mausrad links/ | + | |
| - | WheelLeft:: | + | |
| - | Return | + | |
| - | WheelRight::Home | + | isWheelLeftOnCooldown |
| - | Return | + | Send(' |
| - | </code> | + | |
| + | ; | ||
| + | |||
| + | | ||
| + | } | ||
| + | |||
| + | |||
| + | lastWheelRightTime := 0 | ||
| - | ==== Mausrad kippen um Übersicht der Fenster aufzurufen / zum letzten Fenster wechseln ==== | ||
| - | <code autohotkey> | ||
| - | ; Mausrad links/ | ||
| - | WheelLeft:: | ||
| - | Send !{Tab} | ||
| - | Return | ||
| - | |||
| WheelRight:: | WheelRight:: | ||
| - | Send #{Tab} | + | { |
| - | Return | + | global lastWheelRightTime |
| + | currentTime := A_TickCount | ||
| + | |||
| + | if (currentTime - lastWheelRightTime < 500) | ||
| + | return | ||
| + | |||
| + | lastWheelRightTime := currentTime | ||
| + | | ||
| + | } | ||
| </ | </ | ||
| - | |||
programmieren/autohotkey.1679828030.txt.gz · Last modified: by felix
