deleting all lines up to previous prompt?

by Nihta

Back to Mechanic's Corner.

Nihta2011-10-22 23:32:51
basically I was wondering how I could make a function to delete all lines up to the previous prompt.

my thought was

function gag_between_prompts()
local linetext = getLines(getLineCount(),getLineCount())

while linetext ~= do
deleteLine()
linetext = getLines(getLineCount(),getLineCount())
end

end

my problems: 1) I don't know what to put where is now in the function
2) since I can't run the function (since I don't know what to put for ) I am not entirely sure that it will do what I want it to do.
Raeri2011-10-23 01:08:20
CONFIG PROMPT REMOVE LINEBREAK
Vadi2011-10-23 02:23:54
See if http://forums.mudlet.org/viewtopic.php?f=9&t=2411&p=10685#p10685 helps you
Nihta2011-10-23 21:26:29
The trouble is I am not sure how many lines I want to delete. This is the next try:

myvars.temptriggers.ihtrigger = tempLineTrigger(10,10,, myvars.endline) ~= nil then killTrigger(toString(myvalues.triggers.ihtrigger)) else deleteLine() end]])

but triggers in mudlet are a bit confusing to me as they do not seem to work right away:

I made a test alias that did this and the first time I used it nothing would happen, but if I used it a few times in succession, the tempTrigger would activate and the next 10 lines would be deleted, even if myvars.endline was triggered.

This happens to me with enable and disable of normal triggers too, specifically with enabling triggers, they don't seem to be enabled right away, stuff sent immediatly after the enableTrigger won't alert the trigger for a little bit.
Vadi2011-10-23 22:26:41
They're enabled right away... you most likely are confusing some other code or are enabling it on the same line *after* the trigger was looked at when it was disabled