DISCLAIMER:
- This grid overlay stays on top of everything so if you'll have some plugin windows over your channel rack, these will be covered by the grid too.
- This grid was meant to be used exclusively on a screen where there's only the channel rack.
- The script was made specifically for my setup and window layout and all coordinates are relative to my screens so you'll have to do some (easy) math to correctly shift each grid element's position according to your screen and channel rack position.
- This script works only with a detached channel rack
- I've put some comments so you can better understand what's happening and what to tweak. Many coordinates are negative due to my screen layout so be careful to set them properly.
What the script does is:
Whenever I press a key (Enter)
1) It checks the position of the channel rack
2) if the channel rack lays on those specific x-y coordinates: the channel rack moves on a second screen, becomes larger, and then the grid appears over it
3) Once I press that key again, the channel rack goes back to the original position/size and the grid disappears.
Code: Select all
#IfWinActive ahk_class TStepSeqForm
Enter::
WinGetPos , asdX, asdY, Width, Height, ahk_class TStepSeqForm ;store position and size of Channel Rack
if (asdX = -674 and asdY = -799) ;if position of channel rack is this then...
{
Gui, bar:New, -Caption +AlwaysOnTop +Toolwindow +Border +Disabled, B1 ;DRAW GRID OVERLAY
Gui, bar:Margin, 0, 0
Gui, bar:Color, 434C51
Gui, bar:Font, s6 q4, Verdana ;text font and color for n° 1-2-3-4
Gui, bar:Add, Text, x3 y-1, 1 ;n°1 text position
Gui, bar:Add, Text, x+202 y-1, 2 ;n°2 text position
Gui, bar:Add, Text, x+198 y-1, 3 ;n°3 text position
Gui, bar:Add, Text, x+199 y-1, 4 ;n°4 text position
Gui, bar:Font, cD46A62 s6, Verdana ;text font and color for n°5
Gui, bar:Add, Text, x+198 y-1, 5 ;n°5 text position
Gui, bar:Show, h9 w836 x328 y-1047, B1 ;grey bar size and position
Gui, linea0:New, -Caption +AlwaysOnTop +Toolwindow +Disabled, L0 ;vertical line n°1
Gui, linea0:Color, 8DD452 ;line color
Gui, linea0:Show, h767 w1 x336 y-1032, L0 ;change size and position
Gui, linea1:New, -Caption +AlwaysOnTop +Toolwindow +Disabled, L1 ;vertical line n°2
Gui, linea1:Color, 709069 ;line color
Gui, linea1:Show, h767 w1 x595 y-1032, L1 ;change size and position
Gui, linea2:New, -Caption +AlwaysOnTop +Toolwindow +Disabled, L2 ;vertical line n°3
Gui, linea2:Color, 6CA33F ;line color
Gui, linea2:Show, h767 w1 x851 y-1032 , L2 ;change size and position
Gui, linea3:New, -Caption +AlwaysOnTop +Toolwindow +Disabled, L3 ;vertical line n°4
Gui, linea3:Color, 709069 ;line color
Gui, linea3:Show, h767 w1 x1107 y-1032 , L3 ;change size and position
Gui, linea4:New, -Caption +AlwaysOnTop +Toolwindow +Disabled, L4 ;vertical line n°5
Gui, linea4:Color, D46A62 ;line color
Gui, linea4:Show, h767 w1 x1363 y-1032 , L4 ;change size and position
WinMove, ahk_class TStepSeqForm,,0,-1080, 1442, 1039 ;then move channel rack at these coord + set its size
WinActivate, ahk_class TStepSeqForm ; give focus to the channel rack
}
else if (asdX = 0 and asdY = -1080 ) ;if the channel rack has this size
{
Gui, bar:Hide ;turn off the grid overlay
Gui, linea0:Hide
Gui, linea1:Hide
Gui, linea2:Hide
Gui, linea3:Hide
Gui, linea4:Hide
Gui, linea5:Hide
WinMove, ahk_class TStepSeqForm,,-674,-799, 674, 1879 ;move back the channel rack to original position and size
}
return
#IfWinActive