<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 7 Jun 2022, 23:24 Benoit Minisini, <<a href="mailto:benoit.minisini@gambas-basic.org">benoit.minisini@gambas-basic.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 07/06/2022 à 22:19, Bruce Steers a écrit :<br>
> Has anyone made a routine to strip xterm escape codes from a terminal text?<br>
> <br>
> I'm looking at having to have a close study of the <br>
> TerminalFilter_VT100.class and try to account for all possible code <br>
> combinations to strip them.<br>
> <br>
> I thought before i spent hours doing it i'd ask if anyone already has <br>
> and could share the code.<br>
> <br>
> Or if there is already a way either an existing function somewhere or <br>
> possibly in gb.form.terminal or some other class a function that could <br>
> do it.<br>
> <br>
> I'm looking at TerminalFilter_VT100.class and the function OutputTo() <br>
> looks like it could do it , it seems to do all the right processing but <br>
> for other reasons. maybe by printing to a stream i could get plain text <br>
> but i do not know how to do that :(<br>
> <br>
> Any thoughts/suggestions?<br>
> Many thanks<br>
> All the best<br>
> BruceS<br>
> <br>
<br>
Why do you want to do that?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Because I can us the Process_Read() of the terminal process to control things inside a terminalview running a shell like bash or dash.</div><div dir="auto"><br></div><div dir="auto">I have working a routine that can "Wait" and get return codes/text from commands running inside the bash terminal but it reeds to read the terminal text that has a lot of hidden codes to process out.</div><div dir="auto">I know there is terminalview.text but reading each bit as I t comes and not all the text is preferred.</div><div dir="auto">Cheers</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>