programmieren:autohotkey
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| programmieren:autohotkey [2019/03/04 13:36] – [Fenster positionieren und in Größe ändern (Windows 10)] 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> |
| - | ==== Mit freundlichen Grüßen ==== | ||
| - | <code autohotkey> | ||
| - | ; in einem beliebigen Programm " | ||
| - | ::mfg::Mit freundlichen Grüßen | ||
| - | Return | ||
| - | </ | ||
| ==== F1 drücken bewirkt F2 ==== | ==== F1 drücken bewirkt F2 ==== | ||
| <code autohotkey> | <code autohotkey> | ||
| - | ; beim druecken | + | ; beim Druecken |
| F1::F2 | F1::F2 | ||
| Return | 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 7) ==== | ||
| - | <code autohotkey> | ||
| - | ; ^ = Strg-Taste | ||
| - | ; ! = Alt-Taste | ||
| - | ; # = Windows-Taste | ||
| - | ; a = a-Taste | ||
| - | |||
| - | ; Hoehe der Favouriten-Bar: | ||
| - | widthOffset := 22 | ||
| - | heightOffset := 107 | ||
| - | Width := (1275 + widthOffset) | ||
| - | Height := (851 + heightOffset) | ||
| - | |||
| - | ; Position auf Bildschirm (0/0: obere linke Ecke) | ||
| - | X := 0 | ||
| - | Y := 0 | ||
| - | |||
| - | ; vor den zwei Doppelpunkten wird die Tastenkombination definiert | ||
| - | ^!a:: | ||
| - | 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 | ||
| - | windowx:=10 | + | WheelLeft:: |
| - | windowy:=0 | + | { |
| - | windowh: | + | |
| - | windoww: | + | |
| + | if isWheelLeftOnCooldown | ||
| + | return | ||
| + | isWheelLeftOnCooldown := true | ||
| + | Send(' | ||
| + | |||
| + | ; | ||
| - | ^r:: | + | SetTimer(() => isWheelLeftOnCooldown |
| - | WinGetActiveTitle, Title | + | } |
| - | WinActivate, | + | |
| - | WinRestore, | + | |
| - | ;WinMove, %Title%, , windowx, windowy ,windoww , windowh | + | |
| - | Sleep, 200 | + | |
| - | ; Zielgroesse: | + | |
| - | WinMove, %Title%, , , , 1294, 787 | + | |
| - | return</ | + | |
| - | ==== Mausrad kippen um ganz runter zu scrollen ==== | + | |
| - | <code autohotkey> | + | |
| - | ; Mausrad links/ | + | |
| - | WheelLeft:: | + | |
| - | Return | + | |
| - | WheelRight:: | ||
| - | Return | ||
| - | </ | ||
| + | lastWheelRightTime := 0 | ||
| + | |||
| + | WheelRight:: | ||
| + | { | ||
| + | global lastWheelRightTime | ||
| + | currentTime := A_TickCount | ||
| + | |||
| + | if (currentTime - lastWheelRightTime < 500) | ||
| + | return | ||
| + | |||
| + | lastWheelRightTime := currentTime | ||
| + | Send('# | ||
| + | } | ||
| + | </ | ||
programmieren/autohotkey.1551703012.txt.gz · Last modified: by felix
