ahk-scripts

AutoHotkey scripts
git clone git://pcardenasb.com/ahk-scripts
Log | Files | Refs

MSOffice.ahk (1381B)


      1 #If (MouseIsOver("ahk_exe EXCEL.EXE") && WinActive("ahk_exe EXCEL.EXE"))
      2 ; Default behavior of thumb buttons
      3 XButton1::Send ^{PgUp}
      4 XButton2::Send ^{PgDn}
      5 
      6 ; Zooming
      7 RButton & WheelUp:: Send ^{WheelUp}
      8 RButton & WheelDown:: Send ^{WheelDown}
      9 
     10 ; Hold RButton and press thumb buttons for switching between Windows
     11 RButton::Send {RButton}
     12 RButton & XButton1::
     13 Send {Ctrl down}
     14 Sleep 50
     15 Send {Tab}{Ctrl up}
     16 Return
     17 RButton & XButton2::
     18 Send {Ctrl down}
     19 Sleep 50
     20 Send +{Tab}{Ctrl up}
     21 Return
     22 
     23 ; Hold MButton and press thumb buttons for switching between Windows
     24 MButton::Send {MButton}
     25 MButton & XButton1::
     26 Send {Ctrl down}
     27 Sleep 50
     28 Send {Tab}{Ctrl up}
     29 Return
     30 MButton & XButton2::
     31 Send {Ctrl down}
     32 Sleep 50
     33 Send +{Tab}{Ctrl up}
     34 Return
     35 
     36 #If (MouseIsOver("ahk_exe WINWORD.EXE") && WinActive("ahk_exe WINWORD.EXE"))
     37 ; Zooming
     38 RButton & WheelUp:: Send ^{WheelUp}
     39 RButton & WheelDown:: Send ^{WheelDown}
     40 
     41 ; Hold RButton and press thumb buttons for switching between Windows
     42 RButton::Send {RButton}
     43 RButton & XButton1::
     44 Send {Ctrl down}
     45 Sleep 50
     46 Send {Tab}{Ctrl up}
     47 Return
     48 RButton & XButton2::
     49 Send {Ctrl down}
     50 Sleep 50
     51 Send +{Tab}{Ctrl up}
     52 Return
     53 
     54 ; Hold MButton and press thumb buttons for switching between Windows
     55 MButton::Send {MButton}
     56 MButton & XButton1::
     57 Send {Ctrl down}
     58 Sleep 50
     59 Send {Tab}{Ctrl up}
     60 Return
     61 MButton & XButton2::
     62 Send {Ctrl down}
     63 Sleep 50
     64 Send +{Tab}{Ctrl up}
     65 Return