Autohotkey: Focus project window?

Any Autohotkey experts here?

What do I need to put in my script if I want to make sure the Project window is brought to the front regardless of what other window I might have open?

I have figured out the code for bringing the mixer to the front (WinActivate MixConsole 3) but can’t work out what I need to do for the Project window.

I’ve figured it out now. Just in case anyone needs to know, the code is: WinActivate Cubase Pro Project

You can also use the cubase keycommand: project>>bring to front

I do use autohotkey to bing to front the mixer window. See the complete code below (paste into a autohotkey file):

;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: JBGeluid, Jurgen Brouwer, the Netherlands, 2015, http://www.jbgeluid.nl.
;


#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.


; this script is working on Windows 7, Cubase 8.
; This is a script for activation of the Steinberg Cubase 8 mixer.
; It looks for the Cubase 8 mixer window.
; If it exists, it activates it (brings it to front).
; Else, it sends an F3 command to open it.
; It is NOT working for Cubase 7.
; keybord command: CTRL+WINDOWS+ALT + a (first line in the script below).
;



#!<^a::
SetTitleMatchMode 2
IfWinExist, Cubase
WinActivate
IfWinExist, MixConsole
WinActivate
else
{
Sleep, 200
Send, {F3}
}
return

Hi there

One of the guys here, lucasfrombrooklyn has done fantastic stuff with autohotkey and Cubase, shouldn’t be difficult to find, I think there’s a YouTube video as well, check it out. I use autohotkey with Cubase my live setup, works brilliantly.

And Winactivate is the right command, Winshow is also useful as it brings a window up without stealing focus from the one you’re working on.

Best Regards

Dave

And some more scripts: to set the tabs on the “channel edit window” by a kecommand, I want them to display either:
02. inserts, eq, sends
03. strip, strip, sends
04. inserts, eq, cue sends

this works by mouseposition relative to the channel edit window, so if you expand the window you have to adjust the mouse coordinates for the tabs…The mouse returns to it’s previous position after script execution…(the “MouseGetPos, xpos, ypos” and “MouseMove, %xpos%, %ypos%” parts do this)…

name of the scriptfile: 02 SET ChannelEditWindowTabs to inserts,eq,sends WIN_CTRL_ALT_c v3.ahk
paste the script in a autohotkey file

;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: JBGeluid, Jurgen Brouwer, the Netherlands, 2015, http://www.jbgeluid.nl.
;


#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.
DetectHiddenWindows, on
DetectHiddenText, on


; Script Function:
;this script is working on Windows 7, Cubase 8.
;it sets The “mixer channel-edit window” in Cubase 8 to “inserts, eq, sends” TABS.
;it only works at certain sizes, if you make the channel-edit window to wide it won’t work.
;you can adjust the click positions to adjust to your screen resolution or channel-edit window size.
;keybord command: CTRL+WINDOWS+ALT + c.
;


#!<^c::
MouseGetPos, xpos, ypos
IfWinNotExist, Channel Settings
return
else
{
IfWinExist, Channel Settings
WinActivate, Channel Settings
Sleep 200
Click, left, 80, 80
Sleep 50
Click, left, 80, 480
Sleep 50
Click, left, 555, 80
Sleep 50
Click, left, 813, 80
Sleep 50
Click, left, 813, 480
MouseMove, %xpos%, %ypos%
}


name of the scriptfile: 03 SET ChannelEditWindowTabs to strip,strip,sends WIN_CTRL_ALT_h v3.ahk
paste the script in a autohotkey file

;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: JBGeluid, Jurgen Brouwer, the Netherlands, 2015, http://www.jbgeluid.nl.
;


#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.
DetectHiddenWindows, on
DetectHiddenText, on


; this script is working on Windows 7, Cubase 8.
; it sets The “mixer channel-edit window” in Cubase 8 to “strip, strip, sends” TABS.
; it only works at certain sizes, if you make the channel-edit window to wide it won’t work.
; you can adjust the click positions to adjust to your screen resolution or channel-edit window size.
; keybord command: CTRL+WINDOWS+ALT + h (first line in the script below).
;


#!<^h::
MouseGetPos, xpos, ypos
IfWinNotExist, Channel Settings
return
else
{
IfWinExist, Channel Settings
WinActivate, Channel Settings
Sleep 200
Click, left, 180, 80
Sleep 50
Click, left, 180, 80
Sleep 50
Click, left, 433, 80
Sleep 50
Click, left, 813, 80
Sleep 50
Click, left, 813, 480
MouseMove, %xpos%, %ypos%
}


name of the scriptfile: 04 SET ChannelEditWindowTabs to insert,eq, cue sends WIN_CTRL_ALT_j v3.ahk
paste the script in a autohotkey file

;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: JBGeluid, Jurgen Brouwer, the Netherlands, 2015, http://www.jbgeluid.nl.
;


#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.
DetectHiddenWindows, on
DetectHiddenText, on


; this script is working on Windows 7, Cubase 8.
; it sets The “mixer channel-edit window” in Cubase 8 to “insert, eq, cue sends” TABS.
; it only works at certain sizes, if you make the channel-edit window to wide it won’t work.
; you can adjust the click positions to adjust to your screen resolution or channel-edit window size.
; keybord command: CTRL+WINDOWS+ALT + j (first line in the script below).
;


#!<^j::
MouseGetPos, xpos, ypos
IfWinNotExist, Channel Settings
return
else
{
IfWinExist, Channel Settings
#WinActivateForce, Channel Settings
Sleep 100
Click, left, 80, 80
Sleep 50
Click, left, 80, 480
Sleep 50
Click, left, 555, 80
Sleep 50
Click, left, 880, 80
Sleep 50
Click, left, 880, 480
MouseMove, %xpos%, %ypos%
}

Thanks for the replies. Some interesting stuff here. It’s amazing how powerful AutoHotkey is with Cubase.