Basically I wanna combine two.
Code: Select all
xl := ComObjActive("excel.application")
+WheelUp::xl.ActiveSheet.Next.Select
+WheelDown::xl.ActiveSheet.Previous.Select
Code: Select all
+WheelDown::Send ^{PgUp}
+WheelUp::Send ^{PgDn}
Code: Select all
xl := ComObjActive("excel.application")
+WheelUp::xl.ActiveSheet.Next.Select
+WheelDown::xl.ActiveSheet.Previous.Select
Code: Select all
+WheelDown::Send ^{PgUp}
+WheelUp::Send ^{PgDn}
Code: Select all
#If WinActive MicrosoftEdge.exe
+WheelUp:: Send ^{PgUp}
+WheelDown::Send ^(PgDn}
Code: Select all
#IfWinActive ahk_exe MicrosoftEdge.exe
+WheelUp::Send ^{PgUp}
+WheelDown::Send ^{PgDn}
#IfWinActive
Code: Select all
#If WinActive "ahk_exe Microsoft Edge.exe"
+WheelUp::Send ^{PgDn}
+WheelDown::Send ^{PgUp}
Code: Select all
#If WinActive "ahk_exe Microsoft Edge.exe"
+WheelUp::Send ^{PgDn}
+WheelDown::Send ^{PgUp}
Code: Select all
#IfWinActive ahk_exe msedge.exe
+WheelUp::Send ^{PgUp}
+WheelDown::Send ^{PgDn}
#IfWinActive
Code: Select all
xl := ComObjActive("excel.application")
+WheelUp::xl.ActiveSheet.Next.Select
+WheelDown::xl.ActiveSheet.Previous.Select
#If WinActive "ahk_exe Microsoft Edge.exe"
+WheelUp::Send ^{PgDn}
+WheelDown::Send ^{PgUp}
Code: Select all
#IfWinActive ahk_exe msedge.exe
+WheelUp::Send ^{PgUp}
+WheelDown::Send ^{PgDn}
#IfWinActive
Code: Select all
xl := ComObjActive("excel.application")
+WheelUp::xl.ActiveSheet.Next.Select
+WheelDown::xl.ActiveSheet.Previous.Select
Code: Select all
xl := ComObjActive("Excel.Application")
#IfWinActive ahk_exe EXCEL.exe
+WheelUp::xl.ActiveSheet.Next.Select
+WheelDown::xl.ActiveSheet.Previous.Select
#IfWinActive ahk_exe msedge.exe
+WheelUp::Send ^{PgUp}
+WheelDown::Send ^{PgDn}
#IfWinActive
Code: Select all
;-------------------------------------------------------------
MouseAction_WheelLeft()
{
WinGetTitle, titleIs, A
SetTitleMatchMode, 2
If WinActive("ahk_class SciTEWindow") {
;go left in open scripts in SciTE
Send, {LShift Down}{F6}{LShift Up}
}
Else If WinActive("ahk_class XLMAIN") {
;Go left in worksheets in excel
;Send, {Ctrl Down}{PgUp}{Ctrl Up}
ComObjActive("Excel.Application").ActiveSheet.Previous.Activate
}
Else If WinActive("ahk_class Chrome_WidgetWin_1") {
If WinActive("Teams")
{
;toggle mute
Send, ^+m
}
else
{
;Go back to previous tab in chrome
Send, ^+{Tab}
}
}
Else If WinActive("ahk_class MozillaWindowClass") {
;Go left in tabs in Mozilla
Send, {Ctrl Down}{PgUp}{Ctrl Up}
}
Else If WinActive("ahk_class rctrl_renwnd32") {
;Go up in Outlook
Send, {Up}
}
Else If WinActive("ahk_class AcrobatSDIWindow") {
;go left in adobe acrobat
Send, ^+{Tab}
}
;Spotify
Else If WinActive("ahk_class Chrome_WidgetWin_0") {
Send, {Ctrl down}
Send, {Left}
Send, {Ctrl up}
}
Else If WinActive("ahk_class ZPContentViewWndClass") {
;Mute in Zoom
Hotkey, !a, off
Send, !a
Hotkey, !a, on
}
Else If WinActive("ahk_class Framework::CFrame") {
Send, ^+{Tab}
}
Else {
;to do more than one case at a time use Case 2, 3:
Switch MachineChoice
{
Case -1: ;BLANK
Case 0: ;TEST
Case 1: ;Work - Work PC
switchDesktopToLeft()
TrayTip, Desktop, Desktop %CurrentDesktop%.
SetTimer, HideTrayTip, -2000
Case 2: ;Work - Home PC
switchDesktopToLeft()
TrayTip, Desktop, Desktop %CurrentDesktop%.
SetTimer, HideTrayTip, -2000
Case 3: ;Work - Surface
Send, {LCtrl down}{LWin down}
Sleep, 5
Send, {Left}
Send, {LWin up}{LCtrl up}
TrayTip, Desktop, Desktop %CurrentDesktop%.
SetTimer, HideTrayTip, -2000
Case 4: ;Home - Home PC
switchDesktopToLeft()
TrayTip, Desktop, Desktop %CurrentDesktop%.
SetTimer, HideTrayTip, -2000
Case "4r": ;Home - Gaming (Rimworld)
Case 5: ;Home - Surface
Send, {LCtrl down}{LWin down}
Sleep, 5
Send, {Left}
Send, {LWin up}{LCtrl up}
TrayTip, Desktop, Desktop %CurrentDesktop%.
SetTimer, HideTrayTip, -2000
Default:
msgbox case error
}
}
}
Return
;-------------------------------------------------------------
Code: Select all
;-------------------------------------------------------------
MouseAction_WheelRight()
{
WinGetTitle, titleIs, A
SetTitleMatchMode, 2
If WinActive("ahk_class SciTEWindow") {
Hotkey, F6, off
Send, {F6}
Hotkey, F6, on
}
Else If WinActive("ahk_class XLMAIN") {
;Send, {Ctrl Down}{PgDn}{Ctrl Up}
ComObjActive("Excel.Application").ActiveSheet.Next.Activate
}
Else If WinActive("ahk_class Chrome_WidgetWin_1") {
If WinActive("Teams")
{
;toggle camera
Send, ^+o
}
else
{
;Go forward to next tab
Send, ^{Tab}
}
}
Else If WinActive("ahk_class MozillaWindowClass") {
Send, {Ctrl Down}{PgDn}{Ctrl Up}
}
Else If WinActive("ahk_class rctrl_renwnd32") {
Send, {Down}
}
Else If WinActive("ahk_class AcrobatSDIWindow") {
Send, ^{Tab}
}
;Spotify
Else If WinActive("ahk_class Chrome_WidgetWin_0") {
Send, {Ctrl down}
Send, {Right}
Send, {Ctrl up}
}
Else If WinActive("ahk_class Framework::CFrame") {
Send, ^{Tab}
}
Else {
;to do more than one case at a time use Case 2, 3:
Switch MachineChoice
{
Case -1: ;BLANK
Case 0: ;TEST
Case 1: ;Work - Work PC
switchDesktopToRight()
TrayTip, Desktop, Desktop %CurrentDesktop%.
SetTimer, HideTrayTip, -2000
Case 2: ;Work - Home PC
switchDesktopToRight()
TrayTip, Desktop, Desktop %CurrentDesktop%.
SetTimer, HideTrayTip, -2000
Case 3: ;Work - Surface
Send, {LCtrl down}{LWin down}
Sleep, 5
Send, {Right}
Send, {LWin up}{LCtrl up}
TrayTip, Desktop, Desktop %CurrentDesktop%.
SetTimer, HideTrayTip, -2000
Case 4: ;Home - Home PC
switchDesktopToRight()
TrayTip, Desktop, Desktop %CurrentDesktop%.
SetTimer, HideTrayTip, -2000
Case "4r": ;Home - Gaming (Rimworld)
Case 5: ;Home - Surface
Send, {LCtrl down}{LWin down}
Sleep, 5
Send, {Right}
Send, {LWin up}{LCtrl up}
TrayTip, Desktop, Desktop %CurrentDesktop%.
SetTimer, HideTrayTip, -2000
Default:
msgbox case error
}
}
}
Return
;-------------------------------------------------------------