ok, here you go, find below the part of the code i use to “move project cursor instantly to whereever the mouse cursor is”.
provided as-is - like you’re saying, you may need some tweaking (and definitely so if you use cubase 8). i used windowspy to determine how cubase labels internally its windows and took it from there (why i did this? in order to have the same functionality in the key editor etc.) i’m running this on cubase 7.5 (cubase 8 doesn’t really cut it for me), so the internal window handling may differ further on c8.
;shift + middle button click to locate to whereever the mouse cursor is
GroupAdd, SteinbergSW, ahk_class SteinbergWindowClass
GroupAdd, SteinbergSW, ahk_class SmtgMain Cubase6
GroupAdd, SteinbergSW, SmtgMain Cubase7.5
GroupAdd, SteinbergSW, SmtgMain Cubase7
GroupAdd, SteinbergSW, SmtgMain Cubase6
GroupAdd, SteinbergSW, SmtgMain Cubase6.5
GroupAdd, SteinbergSW, SmtgMain Cubase5
GroupAdd, SteinbergSW, SmtgMain Nuendo6.5
GroupAdd, SteinbergSW, SmtgMain Nuendo6
GroupAdd, SteinbergSW, SmtgMain Nuendo5
GroupAdd, SteinbergSW, SmtgMain Nuendo4
GroupAdd, SteinbergSW, Cubase Pro Project
GroupAdd, SteinbergSW, Cubase 7.5
GroupAdd, SteinbergSW, Cubase 7
GroupAdd, SteinbergSW, Cubase 6.5
GroupAdd, SteinbergSW, Cubase 6
GroupAdd, SteinbergSW, Cubase 5
GroupAdd, SteinbergSW, SteinbergWindowClass
GroupAdd, SteinbergSW, Mixer
GroupAdd, SteinbergSW, Pool
GroupAdd, SteinbergSW, VST
LocateInRulerCoordinate = 165 ;location of the ruler in pixels on the y-axis
#IfWinActive, ahk_group SteinbergSW
Shift & MButton::
MouseGetPos, xpoz, ypoz
SetTitleMatchMode, 1
IfWinActive, ahk_group SteinbergSW, Key Editor
{
CoordMode, Pixel, Relative
CoordMode, Mouse, Relative
WinGetText, JakSeJmenujeAktivniOkno, Cubase 7.5
StringGetPos, notes_pos, JakSeJmenujeAktivniOkno, Key Editor
if notes_pos = 0
{
ControlGetPos, xxxx, yyyy, w, h, Key Editor, ,
Y_Click := (LocateInRulerCoordinate+yyyy-20)
sendinput, {MButton Up}{Shift Up}{click %xpoz%, %Y_Click%, 0}{click}{click %xpoz%, %ypoz%, 0}
return
}
}
IfWinActive, ahk_group SteinbergSW, Audio Part
{
CoordMode, Pixel, Relative
CoordMode, Mouse, Relative
WinGetText, JakSeJmenujeAktivniOkno, Cubase 7.5
StringGetPos, notes_pos, JakSeJmenujeAktivniOkno, Audio Part
if notes_pos = 0
{
ControlGetPos, xxx, yyyy, w, h, Audio Part, ,
Y_Click := (LocateInRulerCoordinate+yyyy-50)
sendinput, {click %xpoz%, %Y_Click%, 0}
sendinput, {click %xpoz%, %ypoz%, 0}
return
}
}
IfWinActive, ahk_group SteinbergSW, Cubase 7.5 Project
{
CoordMode, Pixel, Relative
CoordMode, Mouse, Relative
WinGetText, JakSeJmenujeAktivniOkno, Cubase 7.5
MouseGetPos xxx
MouseGetPos, , , id, control
WinGetTitle, TitleOknaPodMysi, ahk_id %id%
StringGetPos, notes_pos, TitleOknaPodMysi, Project
if notes_pos > -1
{
ControlGetPos, xxx, yyyy, w, h, Cubase 7.5 Project, ,
SetControlDelay -1
Y_Click := (LocateInRulerCoordinate+yyyy-98)
send, {Blind}{MButton Up}
send, {Blind}{Shift Up}
ControlClick, Cubase 7.5, ,,,, NA x%xpoz% y%Y_Click%
return
}
}
{
IfWinActive, ahk_group SteinbergSW, Cubase 7.5 Project
{
CoordMode, Pixel, Relative
CoordMode, Mouse, Relative
MouseGetPos xxx
MouseGetPos, , , id, control
WinGetTitle, TitleOknaPodMysi, ahk_id %id%
StringGetPos, notes_pos, TitleOknaPodMysi, Cubase
if notes_pos = 0
{
StringGetPos, notes_pos, TitleOknaPodMysi, Project
if notes_pos = -1
{
ControlGetPos, xxx, yyyy, w, h, Cubase 7.5 Project, ,
Y_Click := (LocateInRulerCoordinate+yyyy-48)
send, {Blind}{MButton Up}
send, {Blind}{Shift Up}
sendinput, {click %xpoz%, %Y_Click%}{click %xpoz%, %ypoz%, 0}
return
}
}
}
return
}