#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
GroupAdd, cubase, ahk_class Cubase 4FrameWindowClass ;
GroupAdd, cubase, ahk_class Cubase LEFrameWindowClass ;
GroupAdd, cubase, ahk_class Cubase Studio 4FrameWindowClass ;
curMode := 1
return
#IfWinActive, ahk_group Cubase
{
WheelDown::
{
if (curMode=0)
{
send {WheelDown}
return
}
else
{
Send {g}
return
}
}
LControl & WheelDown::
{
if (curMode=0)
{
send {WheelDown}
return
}
else
{
Send ^g
return
}
}
WheelUp::
{
if (curMode=0)
{
send {WheelUp}
return
}
else
{
Send {h}
return
}
}
LControl & WheelUp::
; Alt+Down
{
if (curMode=0)
{
send {WheelUp}
return
}
else
{
Send ^h
return
}
}
MButton::
{
curMode := 1-curMode
return
}
}