Hmm, I was running into some problems.
I changed to using the Status Window's editbox, and using the /! command. The advantages were that it wouldn't mess up the history position, still allowing users to go up and down using the arrow keys. Secondly, it would work for both the editboxes, instead of only the primary one.
However, the disadvantage is that /! only calls the very last line, and keeps calling that same last line.
I tried using the active window again, and using / once more, and now I can pick up multiple consecutive lines (in reverse order, but that's no biggie).
It comes with two disadvantages, though. First, it messes up the current history position. Second, it assumes the first editbox is used. I can easily load the information from the second editbox, but how do I know which one to load from?
Code for using the status window: (Does not support multiple lines, but does work with both editboxes and does not screw up the history position.)
on *:input:*: {
if !$ctrlenter {
if $left($1, 1) != / && $left($1, 1) != $readini($mircini,text,commandchar) {
haltdef
if !%lines {
set %linestatus $editbox(Status Window)
editbox -ns /!
.timergetinput 1 0 getinput
}
inc %lines 1
set %linewindow [ $+ [ %lines ] ] $active
}
}
}
alias getinput {
echo -a Line %lines Window %linewindow [ $+ [ %lines ] ] Editbox: $replace($editbox(Status Window), $chr(32), $chr(160))
dec %lines 1
if !%lines {
editbox -s %linestatus
}
else {
editbox -ns /!
.timergetinput 1 0 getinput
}
}
Code for using the active window: (Supports multiple lines, but messes up the history position, and does not work with the second editbox.)
on *:input:*: {
if !$ctrlenter {
if $left($1, 1) != / && $left($1, 1) != $readini($mircini,text,commandchar) {
haltdef
if !%lines {
editbox -na /
.timergetinput 1 0 getinput $1-
}
inc %lines 1
set %linewindow [ $+ [ %lines ] ] $active
}
}
}
alias getinput {
echo -a Line %lines Window %linewindow [ $+ [ %lines ] ] Editbox: $replace($editbox($active), $chr(32), $chr(160))
dec %lines 1
if !%lines {
editbox -a
}
else {
editbox -na /
.timergetinput 1 0 getinput $1-
}
}
EDIT: Copy-pasted the wrong code.