i did it in autohotkey, it’s actually turned out to be many pages of code
it does in fact work in the key editor, and that’s what made it complicated (i have to be calling functions determining what the active window is, and if it is the key editor, then offset where the mouse is targetting; and also compensate for when you have moved the cubase project window, and so on and so forth).
i doubt this will make much sense since it’s tailor-made for my cubase (and is probably a bit ‘dirty’ because i never received any programming training)… but since you asked-- here’s an excerpt of the code that does just that:
#IfWinActive, ahk_group SteinbergSW
w::
MouseGetPos, xpoz, ypoz
SetTitleMatchMode, 1
CoordMode, Pixel, Relative
CoordMode, Mouse, Relative
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IfWinActive, ahk_group SteinbergSW, Key Editor
{
WinGetText, ActiveWinName, Cubase 7.5
StringGetPos, notes_pos, ActiveWinName, Key Editor
if notes_pos = 0
{
ControlGetPos, xxxx, yyyy, w, h, Key Editor, ,
Y_Click := (LocateInRulerCoordinate+yyyy-20)
sendinput, {click %xpoz%, %Y_Click%, 0}{click}{click %xpoz%, %ypoz%, 0}
return
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IfWinActive, ahk_group SteinbergSW, Audio Part
{
WinGetText, ActiveWinName, Cubase 7.5
StringGetPos, notes_pos, ActiveWinName, 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
{
MouseGetPos, , , id,
WinGetTitle, TitleOfWin, ahk_id %id%
StringGetPos, notes_pos, TitleOfWin, Project
if notes_pos > -1
{
ControlGetPos, xxx, yyyy, w, h, Cubase 7.5 Project, ,
Y_Click := (LocateInRulerCoordinate+yyyy-48)
sendinput, {click %xpoz%, %Y_Click%}{click %xpoz%, %ypoz%, 0}
return
}
if notes_pos = -1
{
ControlGetPos, xxx, yyyy, w, h, Cubase 7.5 Project, ,
Y_Click := (LocateInRulerCoordinate+yyyy-48) ,
sendinput, {click %xpoz%, %Y_Click%}{click %xpoz%, %ypoz%, 0}
return
}
}
return