Looking for someone good with Auto Hotkey and Cubase 13 for mousewheel horizontal zoom

Hi,
i’m looking for someone that can help me alter my Autohotkey script that made the mousewheel function as horizontal zoom in Cubase 12 PC (it triggered G and H), but only in the arrangement section, midi editor and sample editor, and not at the side browsers.

I’ll paste the current script here because it might help someone looking for the same thing.

This is the current script:


If !RegExMatch(DllCall("GetCommandLine", "str"), " /restart(?!\S)") 
   RunWait "C:\Program Files\AutoHotkey\v1.1.36.02\AutoHotkeyU64_UIA.exe" /restart "%A_ScriptFullPath%" 


Global RightBarWidth := 395

CoordMode, Mouse

#If MouseIsOver()
WheelDown::

sendplay {G}
return

WheelUp::

sendplay {H}
return
#If

MouseIsOver()
{
   MouseGetPos, x,, id
   WinGetClass, class, ahk_id %id%
   if (class = "SteinbergWindowClass")
   {
      WinGetTitle, title, ahk_id %id%
      if RegexMatch(title, "i)^(Cubase Pro Project|Sample Editor:|Key Editor:|Scores:|Drum Editor:)", match)
      {
         if (match = "Cubase Pro Project")
         {
            WinGetPos, OutX,, OutWidth,, ahk_id %id%
            if (x >= OutX+OutWidth-RightBarWidth)
               return
         }
         return true
      }
   }
   return
}

This is fully functional in Cubase 12, but stopped working in 13.

It’s probably a longshot but is there something obvious here that will not react to Cubase 13?

Thanks!

Can you put in practice step by step how this works for you?

It’s a bit complicated script for just zoom.

As I understand you changing default behavior of scrollwheel up/down instead of moving vertically you want to zoom horizontally am I right?

I agree it’s complicated. I had someone make this script for me (who is now no longer around to do that) so i can’t really explain how it works. I have no coding experience.
But it started with a simple script that grew in complexity as more barriers appeared.

Yes, I would like the mousewheel up and down to zoom horizontally while keeping centered, so what G and H do in the Cubase default. By default the mousewheel up/down scrolls up and down.

I know ctrl+mousewheel exists but that is to do targeted zooming, and i really like using both.

The difficulty in making this work was that i want the mousewheel to react normally on the right sidebar and while scrolling through plugins. This script worked perfectly in C12 but something has changed in 13 and it’s not responsive.
Even with all that sidebar stuff removed it stopped working, so the problem might be elsewhere.

Edit: It might have something to do with Cubase 13 getting rid of that semi-floating menu bar on the top. From what i know from talking to the person who scripted this last year, that part was quite important. But i’m not sure.

Hi, give this one a try. Replace

if (class = "SteinbergWindowClass")

with

if (instr(class,"SteinbergWindowClass")=1)
1 Like

OMG you’re an absolute hero! Thanks so much!

For learning purposes can I bother you to explain why this change matters?

Sure. I saw that the class name is now: SteinbergWindowClass꒠ݰ. Don’t know what the final two symbols are supposed to do there, this is why I changed the search to a startsWith type.

image
This one isn’t same? Symbols? By comments it seems that this release is really rushed :frowning:

Strange, Google thinks it’s a Pakistani dialect :upside_down_face:
Thanks!

I’m not sure this is on Steinberg rushing because it’s kind of my idiosyncratic ways that make me want to automate with a third party app.
I didn’t know about Window Spy so thanks for introducting me to that.

Thats right click on AHK try icon and you will find windows spy.

Anyway you have AHK discord channel where you can check for help in future. Also i am far from coding but I fixed lot of my scripts and make them more reliable over chat gpt, try and error but reach working solution in most cases.

Rushed I meant lot of inconsistencies on all areas, I mean when they release glichy graphic and state that in rls notes that they will fix that in next maintained update :roll_eyes:

1 Like