One problem if I want to analyze text(using standard Ascii control codes)
first is that it is time consuming work!
here is an example: (txt is command which I received )

    for(x=0; x<txt.length; x++){
        var chr = txt.substr(x,1);
        var code = chr.charCodeAt();

        switch(code){
        case 0:
            break;
        case 8:
            textbox.value =
textbox.value.substring(0,textbox.value.length-2);
            break;
        .........
        .........
        .........
        default:
            this.textbox.value += txt.substr(x,1);
        }
    }

In this case I should add this procedure instead of sending whole command to
the element (textbox here)
and such works in JavaScript needs lots of time :(

Any Idea ?

On Thu, Oct 30, 2008 at 8:10 PM, joe ertaba <[EMAIL PROTECTED]> wrote:

> Hi Neil
>
> Yes I read output with correct set of chars, I can do analysis to find out
> with chars are command and with are text, I wounder if there is a standard
> element which can do this work (send whole chars and it show text in correct
> format,...)?
>
>
> On Thu, Oct 30, 2008 at 6:16 PM, Neil <[EMAIL PROTECTED]> wrote:
>
>> joe ertaba wrote:
>>
>>  I can redirect output of some program to my extension, but when I send
>>> them to textbox there are lots of unknown chars, so I wonder if there is any
>>> other elements which can handle these standard commands without extra
>>> programing
>>>
>>> Any Idea ?
>>>
>>
>> Did you read the output using the correct character set? Command prompt
>> usually uses the application charset (typically Windows-1252) although the
>> chcp command can change this at least for cmd.exe itself.
>> _______________________________________________
>> Project_owners mailing list
>> [email protected]
>> https://www.mozdev.org/mailman/listinfo/project_owners
>>
>
>
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners

Reply via email to