#1153 Input of batch files is closed after one character

Bug
open-accepted
SciTE (626)
3
2011-05-23
2011-05-22
v.ovcacik
No

What steps will reproduce the problem?
1. Download wscite225.zip executables.
2. Unzip & run scite.exe.
3. Copy & paste following:

set /P ask=ask:
echo %ask%

4. Save it as *.bat
5. Execute "Tools > Go" or press F5
6. In the "Output" try to input more than one character.

What is the expected output? What do you see instead?
Input is closed after passing first character (of user input) to %ask% variable. Input should be closed after pressing enter, which would allow passing more than just a one character.

What version of the product are you using? On what operating system?
SciTE 2.25
Windows 7 Professional (Czech)

Discussion

  • Neil Hodgson

    Neil Hodgson - 2011-05-23

    SciTE just writes each character as it is typed to the input pipe of the batch process. When run from the command line buffered input is used so nothing is seen until the Enter key. I don't think anything can be easily done here. You could try adding buffering but that won't work in other cases where the process should respond to each key.

    I won't be working on this.

     
  • Neil Hodgson

    Neil Hodgson - 2011-05-23
    • assigned_to: nobody --> nyamatongwe
    • priority: 5 --> 3
    • status: open --> open-accepted
     
  • v.ovcacik

    v.ovcacik - 2011-06-20

    @nyamatongwe

    I am pretty sure we are not on the same page.

    "SciTE just writes each character as it is typed to the input pipe of the
    batch process. "
    --- SciTE writes only first one character to the input pipe of batch process.

    "When run from the command line buffered input is used so
    nothing is seen until the Enter key."
    --- I don't have to press Enter key to continue the batch - the input is automatically closed after one character!

    The trouble is that SciTE does not wait to user to input more characters. This is SciTE bug and it should be very easy to remove it once you will be able to recreate the problem.

    P.S. No sane man will be adding some sort of buffering for user input just because SciTE cant handle more than one char.

     
  • Neil Hodgson

    Neil Hodgson - 2011-06-20

    SciTE does write more than one character to a process over time. This can be seen by running "python -i -u" for example. SciTE writes each character individually. When "set /P ask=ask:" receives a character from SciTE it terminates.

    Running from the command line, that is, from a Command Prompt window, does not terminate after one character.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks