Size the SciTE Output window

Get help with using AutoHotkey and its commands and hotkeys
JJohnston2
Posts: 193
Joined: 24 Jun 2015, 23:38

Size the SciTE Output window

15 Sep 2017, 20:13

In SciTE there is an output window that can be used split screen.

The class for the window on top is usually Scintilla1 and Scintilla2 for the window on bottom.

The splitter bar in the middle appears to show SciTEWindowContent1, which actually encompasses both Scintilla1 and Scintilla 2, but dragging the divider up or down will determine whether the screen is split 50/50, 80/20, etc. between the top and bottom panes.

I was looking for a way to access the splitter bar programmatically and move it. If I resize the pane controls individually it has close to the effect I was hoping for, but the splitter bar also disappears (and therefore looks different), and if you click where the splitter bar should be, the mouse will jump back to where it used to be, i.e., to where the division between panes used to be.

Here's the test code that will move the splitter division down 50 pixels. Any ideas on how to actually move the splitter without clicking the mouse on it and having the mouse move?

Code: Select all

ControlGetPos, X, Y, W, H, % Ctl:="Scintilla2", A
ControlMove, % Ctl, % x, % y+50, % w, % h-50, A
ControlGetPos, X, Y, W, H, % Ctl:="Scintilla1", A
ControlMove, % Ctl, % x, % y, % w, % h+50, A
teadrinker
Posts: 1856
Joined: 29 Mar 2015, 09:41
Contact:

Re: Size the SciTE Output window

15 Sep 2017, 22:37

I only managed to do it like this:

Code: Select all

shift := 50

ControlGetPos, X1, Y1, W,, Scintilla2, A
Y1 -= 4, X2 := X1 + W - 10, X1 += 10
CoordMode, Mouse, Window
MouseGetPos, X, Y
SetMouseDelay, -1
MouseClickDrag, Left, X < X1 ? X1 : X > X2 ? X2 : X, Y1, X1, Y1 + shift, 0
MouseMove, X, Y, 0
Or

Code: Select all

#IfWinActive ahk_class SciTEWindow
>!Up::
>!Down::
   CoordMode, Mouse, Window
   MouseGetPos, X, Y
   SetMouseDelay, -1
   factor := InStr(A_ThisHotkey, "Up") ? -1 : 1
   thisHotkey := RegExReplace(A_ThisHotkey, "i).*?([a-z].*)", "$1")
   While GetKeyState(thisHotkey, "P")  {
      ControlGetPos, X1, Y1,,, Scintilla2, A
      X1 += 10, Y1 -= 4
      MouseClickDrag, Left, X1, Y1, X1, Y1 + A_Index*factor, 0
      Sleep, 20
   }
   MouseMove, X, Y, 0
   Return

Return to “Ask For Help”

Who is online

Users browsing this forum: f1ster, Jovannb, mikeyww, Rikk03 and 47 guests