AHK script for inserts

I’ve tried modifying this script for Cubase 15 but I’m useless at ahk scripting. I’s such a useful script to add “insert plugin” command, can anyone help?

Here’s the original script for Cubase 9.5

;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Select an Insert <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

!1:: ; Alt+1 hotkey.
Y:=114 ; (114)
Sleep 10
SendEvent {Alt up}
GoSub, SelIns
return

!2:: ; Alt+2 hotkey.
Y:=114+22.06
Sleep 50
SendEvent {Alt up}
GoSub, SelIns
return

!3:: ; Alt+3 hotkey.
Y:=114+22.06*2
Sleep 50
SendEvent {Alt up}
GoSub, SelIns
return

!4:: ; Alt+4 hotkey.
Y:=114+22.06*3
Sleep 50
SendEvent {Alt up}
GoSub, SelIns
return

!5:: ; Alt+5 hotkey.
Y:=114+22.06*4
Sleep 50
SendEvent {Alt up}
GoSub, SelIns
return

!6:: ; Alt+6 hotkey.
Y:=114+22.06*5
Sleep 50
SendEvent {Alt up}
GoSub, SelIns
return

!7:: ; Alt+7 hotkey.
Y:=114+22.06*6
Sleep 50
SendEvent {Alt up}
GoSub, SelIns
return

!8:: ; Alt+8 hotkey.
Y:=114+22.06*7
Sleep 50
SendEvent {Alt up}
GoSub, SelIns
return

!9:: ; Alt+9 hotkey.
Y:=114+22.06*8
Sleep 50
SendEvent {Alt up}
GoSub, SelIns
return

!0:: ; Alt+0 hotkey.
Y:=114+22.06*9
Sleep 50
SendEvent {Alt up}
GoSub, SelIns
return

SelIns:
IfWinExist, Channel Settings
WinActivate
else
{
SendEvent e
WinWaitActive, Channel Settings
}

PixelGetColor, InsColor, 84,86, [RGB] ;Check the Tab Inserts/Strip
If InsColor <> 0x2F3840 ;if Strip is active
{
Click 84,86 ;Open Inserts
Sleep 100
}
MouseMove 187,Y ;Select an Insert , (x=187)
Sleep 50
;MouseMove 194,Y
;Sleep 100
Click
Return
#IfWinExist

;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< End <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

I have a cubase 15 ahk script that inserts a plugin to the first free Insert slot on the selected track. It currently relies on the Channel Tab to be open though. It works flawless in cubase 14 but since they changed the channel tab a little bit in 15 (inserts are scrollable and fold different) it is just working if you use max 8 inserts.

would this be helpfull ?