Nick, I've been working on a script to do the whole secondary pane for the world window, except well... I can't get it to work. And it performs differently all the time.
It's either a problem with MoveWorldWindowX, or a problem with aliases and send to script.
I've found that it seems to 'remember' things that it shouldn't (I'll do a few calls, and then reset my windows, and then sometimes the windows will return to a position that would have happened after a second call on the first).
Problems seem to be different each time I close/restart Mushclient. So, I really don't think it's a problem with my script, since it seems, well, simple. And actually, I've over simplified it in my frustration, so it's fairly verbose and open. I have a few versions of it saved, so if this one doesn't do as many crazy things as indicated, I can post another version to see if it does (even though they should do the same thing).
I even tried setting the windows to the same values, and it wasn't working.
<aliases>
<alias
match="^split( (\d+))?$"
enabled="y"
echo_alias="y"
regexp="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>dim current 'Array of current windows dimensions
dim cur, max
dim curL,curT,curW,curH,newH
cur = CInt("%2") 'window to split
max = GetInfo(235) 'max is one below what the next window will be numbered
note "Max = " & max
current = Split(GetWorldWindowPositionX(cur),",")
note "Current: " & current(0) & ", " & current(1) & ", " & current(2) & ", " & current(3)
'L,T,W,H
curL = current(0)
curT = current(1) 'top
curW = current(2)
curH = current(3) 'height
newH = CInt(curH/2)
note "NewH = " & newH
note "curT+newH = " & curT+newH
MoveWorldWindowX curL, curT+newH, curW, newH, cur
DoCommand "NewWindow"
MoveWorldWindowX curL, curT, curW, newH, max+1</send>
</alias>
</aliases>
Basically what it's supposed to do is split the window in half vertically (the new window ontop, the old on the bottom).
You type "split 1" (the number is the window number, I took out the omit part for debugging, so you'll have to set it manually right now).
Of course, there is no 'PauseX' so we can't force a pause on one window and not the other at the moment. But that's a suggestion, not a bug report, and I digress anyway.
Of course, it might not be a bug at all, could be a problem with my code (It looks right though, and it's not exactly complicated). |