Omit from Output is useful in many circumstances, but often impractical or completely impossible to use. This is bound to only become worse if Mushclient ever extends to support inline images or other similar things. An omitted line in some location where someone wanted to replace one word would seriously screw everything up if multiple fonts where involved, let alone some sort of inline images that may appear in the middle of it. I know, it would be real stupid but imagine something like this:
You see [small image here] floating in the air.
and the user wants to change that to say:
You see [small image here] -Backbiter- floating in the air.
Omit from ouput would either a) omit everything including the image or b) show the image on the wrong line, but let you insert the altered line after. In either case it would lose any font info too, like say the word floating done in something that looks like feathers (someone may actually thing this is a good idea..). This is even dumber imho if the line was just the first two words plus the image and all they wanted was to tack a word on the end of the line.
A better solution needs to be arrived at. One possibility is to add commands InsertText and InsertTextColour:
Insert (INTEGER character position, BSTR Text)
InsertTextColour (INTEGER character position, COLOR Foreground, COLOR Background, BSTR Text)
You would need to delay insertion until the sub ended and the client would have to shift the location of styles, or duplicate existing styles where the new stuff cuts it in half, as well as keeping track of the new offset for the next insert, but it isn't impossible. How thins effects situations like the image in the middle of the line... I suspect that would need to be a special style type that also gets shifted as needed. If you ever add more MXP support into the client, these things probably need to be considered prior to when they get added. There is bound to be things that work real well with text that won't work once you start imbedding images or other things.
However, the above idea would solve a number of irritating problems people have run into that involve text insertion. While it doesn't make 'quite' as much sense as having a special trigger, it is more practical, since I can't for the life of me think of a practical way to let a trigger insert text *and* color, especially if there are multiple insertion points.
Of course this probably doesn't fix the experiment I tried before, but... I still would, if debugging my own MXP, prefer to 'see' the defective tag in place, instead of using the complicated mess that the On MXP Error sub returns or using a debugging window that I can't use because it a) can't be positioned outside the client area and b) I don't like/want to cram it in under or above the world window. This is just a matter of personal taste I suppose, but I also find debuggers that tell me I have "Unknown error #324 on line 3165", but can't show me 'which' line that is in an IDE irritating as well. I hate command line debuggers for this reason. Mimicry of zMud and others behaviour should be an option and adding one flag to the MXP setting to allow it can't be that big a deal, even if you are an obstinate sob about it. ;) lol
You see [small image here] floating in the air.
and the user wants to change that to say:
You see [small image here] -Backbiter- floating in the air.
Omit from ouput would either a) omit everything including the image or b) show the image on the wrong line, but let you insert the altered line after. In either case it would lose any font info too, like say the word floating done in something that looks like feathers (someone may actually thing this is a good idea..). This is even dumber imho if the line was just the first two words plus the image and all they wanted was to tack a word on the end of the line.
A better solution needs to be arrived at. One possibility is to add commands InsertText and InsertTextColour:
Insert (INTEGER character position, BSTR Text)
InsertTextColour (INTEGER character position, COLOR Foreground, COLOR Background, BSTR Text)
You would need to delay insertion until the sub ended and the client would have to shift the location of styles, or duplicate existing styles where the new stuff cuts it in half, as well as keeping track of the new offset for the next insert, but it isn't impossible. How thins effects situations like the image in the middle of the line... I suspect that would need to be a special style type that also gets shifted as needed. If you ever add more MXP support into the client, these things probably need to be considered prior to when they get added. There is bound to be things that work real well with text that won't work once you start imbedding images or other things.
However, the above idea would solve a number of irritating problems people have run into that involve text insertion. While it doesn't make 'quite' as much sense as having a special trigger, it is more practical, since I can't for the life of me think of a practical way to let a trigger insert text *and* color, especially if there are multiple insertion points.
Of course this probably doesn't fix the experiment I tried before, but... I still would, if debugging my own MXP, prefer to 'see' the defective tag in place, instead of using the complicated mess that the On MXP Error sub returns or using a debugging window that I can't use because it a) can't be positioned outside the client area and b) I don't like/want to cram it in under or above the world window. This is just a matter of personal taste I suppose, but I also find debuggers that tell me I have "Unknown error #324 on line 3165", but can't show me 'which' line that is in an IDE irritating as well. I hate command line debuggers for this reason. Mimicry of zMud and others behaviour should be an option and adding one flag to the MXP setting to allow it can't be that big a deal, even if you are an obstinate sob about it. ;) lol