Method to move the SciTE divider for search results

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JJohnston2
Posts: 204
Joined: 24 Jun 2015, 23:38

Method to move the SciTE divider for search results

Post by JJohnston2 » 02 Apr 2022, 18:25

I would like to toggle the vertical size of the search result pane in SciTE between 'normal (default)' and 'lots of search results showing, almost no code visible'. This can probably be done with a simulated mouse click+drag but I was looking for a programmatic way first, to adjust the pane size.

Details: Opening search results in SciTE results yields a pane at the bottom with a divider that can be dragged up and down to change the size split between the code shown in the top pane, and the search results shown in the bottom pane.

These panes (Scintilla1 and Scintilla2) have their own hwnd that can be retrieved via ControlGet, and it looks like there is also an owning "Source" / SciTEWindowContent window which encompasses both of these panes (looking in Spy++).

There does not appear to be a control associated with the divider itself, that sits between these two panes (i.e., the divider you would click and drag to split the screen differently).

If the pane sizes are retrieved via ControlGetPos and then adjusted via ControlMove (just in the vertical position or height), the panes change size and do funny things, but the vertical divider doesn't really get updated or work as expected.

Any ideas on how the pane split could be moved programmatically?

User avatar
boiler
Posts: 17387
Joined: 21 Dec 2014, 02:44

Re: Method to move the SciTE divider for search results

Post by boiler » 02 Apr 2022, 18:33

Use ControlMove to resize both of the panes. To do the equivalent of draging the divider up, reduce the height of the top one while also moving the position of the bottom one up and increasing its height by the same amount. Do the opposite to effectively drag the divider down.

It looks like you may have tried this with questionable results. Is that the case? Did you do it as I described? I don’t use SciTE4AutoHotkey anymore, so I can’t try it myself.

JJohnston2
Posts: 204
Joined: 24 Jun 2015, 23:38

Re: Method to move the SciTE divider for search results

Post by JJohnston2 » 03 Apr 2022, 15:36

Yep, that occurred to me as a possible solution while I was writing the first post, so I went ahead and tried it. The top pane can be reduced in size (temporarily until you click) but the border between panes doesn't move. Changing the size of the bottom pane makes the bottom pane disappear completely (temporarily until you click).

Thanks for the reply. It was worth a shot to see if anyone might know.

What do you use for an editor now? I've looked at some of the other ones but haven't been excited enough to switch over. SciTE is pretty old and barely functional in some regards though.

User avatar
boiler
Posts: 17387
Joined: 21 Dec 2014, 02:44

Re: Method to move the SciTE divider for search results

Post by boiler » 03 Apr 2022, 16:02

After having tried all the most popular options that have AHK support, I landed on Visual Studio Code.

Post Reply

Return to “Ask for Help (v1)”