User Tools

Site Tools


programmieren:autohotkey

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
programmieren:autohotkey [2019/05/28 12:47] – [Einfg drücken bewirkt Ende] felixprogrammieren: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 win10cycledesktops.ahk>+<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 21: Line 21:
 ;Strg+Win+W (schliessen) ;Strg+Win+W (schliessen)
 ^#w::^#F4 ^#w::^#F4
-Return 
-</file> 
- 
-==== Mit freundlichen Grüßen ==== 
-<code autohotkey> 
-; in einem beliebigen Programm "mfg" eintippen und schon erscheint es ausgeschrieben 
-::mfg::Mit freundlichen Grüßen 
 Return Return
 </code> </code>
 +
  
 ==== F1 drücken bewirkt F2 ==== ==== F1 drücken bewirkt F2 ====
Line 38: Line 32:
 </code> </code>
  
-==== Einfg drücken bewirkt Ende ==== +
-<code autohotkey> +
-; beim Druecken von Einfg wird tatsaechlich Ende ausgefuehrt +
-Insert::End +
-Return +
-</code>+
 ==== Tastenkombination startet Programm ==== ==== Tastenkombination startet Programm ====
 <code autohotkey> <code autohotkey>
 ; das Such-Programm "Everything" mit Windows+S starten ; das Such-Programm "Everything" mit Windows+S starten
-#s:: +#s:: { 
-Run%ProgramFiles%\Everything\Everything.exe + Run("%ProgramFiles%\Everything\Everything.exe") 
-Return+}
 </code> </code>
 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/rechts kippen auf "Alt+Tab" und "Win+Tab" setzen 
-Run, C:\Apps\cmder\Cmder.exe+WheelLeft:: 
 + Send !{Tab}
 Return Return
-</code> 
-==== Fenster positionieren und in Größe ändern (Windows 7) ==== 
-<code autohotkey> 
-; ^ = Strg-Taste 
-; ! = Alt-Taste 
-; # = Windows-Taste 
-; a = a-Taste 
    
-; Hoehe der Favouriten-Bar30px (hier noch nicht abgezogen) +WheelRight:: 
-widthOffset := 22 + Send #{Tab} 
-heightOffset := 107 +Return 
-Width := (1275 + widthOffset) +</code>
-Height := (851 + heightOffset) +
-  +
-; Position auf Bildschirm (0/0: obere linke Ecke) +
-X := 0 +
-Y := 0 +
-  +
-; vor den zwei Doppelpunkten wird die Tastenkombination definiert +
-^!a::WinMove,A,,%X%,%Y%,%Width%,%Height% +
-Return</code>+
  
-==== Fenster positionieren und in Größe ändern (Windows 10) ====+AHK v2-kompatibler Code:
 <code autohotkey> <code autohotkey>
-#NoEnv  Recommended for performance and compatibility with future AutoHotkey releases. +Mausrad links/rechts kippen auf "Alt+Tab" und "Win+Tab" setzen
-; #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.+
  
 +isWheelLeftOnCooldown := false
  
-; ==== Windows 10 Besonderheit ==== +WheelLeft:: 
-; Variablen funktionieren hier nicht! - aber mit festen Zahlen gehts! +{ 
-;windowx:=10 +    global isWheelLeftOnCooldown
-;windowy:=0  +
-;windowh:=500 +
-;windoww:=700+
  
-^!a:: +    if isWheelLeftOnCooldown 
- WinGetActiveTitle, Title +        return
- WinActivate, %Title% +
- WinRestore, %Title%     +
- Sleep, 200 +
- ;WinMove, %Title%, , windowx, windowy, windoww, windowh  +
- ; Zielgroesse des Fensters: 1280x780 +
- WinMove, %Title%, , , , 1294, 787 +
-return +
-</code> +
-==== Mausrad kippen um ganz runter zu scrollen ==== +
-<code autohotkey> +
-; Mausrad links/rechts kippen auf "Pos1" und "Ende" setzen +
-WheelLeft::End +
-Return+
  
-WheelRight::Home +    isWheelLeftOnCooldown := true 
-Return +    Send('!{Tab}') ; Alt + Tab 
-</code>+  
 + ;SoundBeep(2000, 100)        ; Debug-Sound1000 Hz für 100 ms 
 + 
 +    SetTimer(() =isWheelLeftOnCooldown := false, -500) ; 500 ms Sperre 
 +
 + 
 + 
 +lastWheelRightTime := 0
  
-==== Mausrad kippen um Übersicht der Fenster aufzurufen / zum letzten Fenster wechseln ==== 
-<code autohotkey> 
-; Mausrad links/rechts kippen auf "Alt+Tab" und "Win+Tab" setzen 
-WheelLeft:: 
- Send !{Tab} 
-Return 
-  
 WheelRight:: WheelRight::
- Send #{Tab} +
-Return+    global lastWheelRightTime 
 +    currentTime := A_TickCount 
 + 
 +    if (currentTime - lastWheelRightTime < 500) 
 +        return 
 + 
 +    lastWheelRightTime := currentTime 
 +    Send('#{Tab}' ; Win + Tab 
 +}
 </code> </code>
- 
programmieren/autohotkey.1559040472.txt.gz · Last modified: by felix

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki