ahk-scripts

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit bbf8d2d1d4910a53430f7716a499ddc6b735596c
parent 4eb030f508cfd1be2aa985b03289faead1ba00f3
Author: Pablo Cárdenas <pablocb2303@gmail.com>
Date:   Wed, 31 May 2017 00:56:15 -0500

Added more programs support

Diffstat:
ACSI.ahk | 24++++++++++++++++++++++++
MDesktopEnvironment.ahk | 13+++++++++++--
AMSOffice.ahk | 32++++++++++++++++++++++++++++++++
MMain.ahk | 3+++
ASumatraPDF.ahk | 11+++++++++++
5 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/CSI.ahk b/CSI.ahk @@ -0,0 +1,24 @@ +#If (MouseIsOver("ahk_exe ETABS.exe") && WinActive("ahk_exe ETABS.exe")) + || (MouseIsOver("ahk_exe SAP2000.exe") && WinActive("ahk_exe SAP2000.exe")) + || (MouseIsOver("ahk_exe SAFE.exe") && WinActive("ahk_exe SAFE.exe")) +; Default behavior of thumb buttons +XButton1::Send {Esc} +XButton2::Send {Enter} + +; Hold MButton and press thumb buttons for switching between Windows +~MButton::Return +MButton & XButton1::Send {MButton up}^{Tab}{MButton Down} +MButton & XButton2::Send {MButton up}^+{Tab}{MButton Down} + +; Hold RButton and press thumb buttons for switching between Windows +RButton::Send {RButton} +RButton & XButton1::Send ^{Tab} +RButton & XButton2::Send ^+{Tab} + +; Hold XButton1 to orbit +XButton1 & MButton:: +Send {Shift down}{MButton down} +KeyWait MButton +Send {Shift up}{MButton up} +Return +#If diff --git a/DesktopEnvironment.ahk b/DesktopEnvironment.ahk @@ -1,8 +1,13 @@ ; Launch Double Commander -^#e::Run, "C:\Program Files\Double Commander\doublecmd.exe" +#+e::Run, "C:\Program Files\Double Commander\doublecmd.exe" ; Launch Qutebrowser -^#w::Run, "C:\Program Files\qutebrowser\qutebrowser.exe" +#+w::Run, "C:\Program Files\qutebrowser\qutebrowser.exe" + +; Like i3wm +#+q::Send !{F4} +#j::Send ^#{Left} +#ñ::Send ^#{Right} ; CapsLock shows an alert when pressed *CapsLock:: @@ -15,6 +20,10 @@ If !GetKeyState("capslock","T") { } Return ++Ins:: +clipboard = %clipboard% +Return + #If WinActive("ahk_class MultitaskingViewFrame") || MouseIsOver("ahk_class Shell_TrayWnd", "MSTaskListWClass1") ; Cycle through virtual desktops diff --git a/MSOffice.ahk b/MSOffice.ahk @@ -0,0 +1,32 @@ +#If (MouseIsOver("ahk_exe EXCEL.EXE") && WinActive("ahk_exe EXCEL.EXE")) +; Default behavior of thumb buttons +XButton1::Send ^{PgUp} +XButton2::Send ^{PgDn} + +; Hold RButton and press thumb buttons for switching between Windows +RButton::Send {RButton} +RButton & XButton1:: +Send {Ctrl down} +Sleep 50 +Send {Tab}{Ctrl up} +Return +RButton & XButton2:: +Send {Ctrl down} +Sleep 50 +Send +{Tab}{Ctrl up} +Return + +; Hold MButton and press thumb buttons for switching between Windows +MButton::Send {MButton} +MButton & XButton1:: +Send {Ctrl down} +Sleep 50 +Send {Tab}{Ctrl up} +Return +MButton & XButton2:: +Send {Ctrl down} +Sleep 50 +Send +{Tab}{Ctrl up} +Return + +#If diff --git a/Main.ahk b/Main.ahk @@ -7,5 +7,8 @@ SetTitleMatchMode, RegEx #include DesktopEnvironment.ahk #include Autodesk.ahk +#include SumatraPDF.ahk +#include CSI.ahk +#include MSOffice.ahk #include Qutebrowser.ahk #include Common.ahk diff --git a/SumatraPDF.ahk b/SumatraPDF.ahk @@ -0,0 +1,11 @@ +#If (MouseIsOver("ahk_exe SumatraPDF.exe") && WinActive("ahk_exe SumatraPDF.exe")) + +; Hold MButton and press thumb buttons for switching between Windows +~MButton::Return +MButton & XButton1::Send ^{Tab} +MButton & XButton2::Send ^+{Tab} + +; Hold RButton and press thumb buttons for switching between Windows +~RButton::Return +RButton & XButton1::Send ^{Tab} +RButton & XButton2::Send ^+{Tab}