Hello everyone, I have searched for this high and low but could not find a solution.

To elaborate on the heading. I am trying to figure out a way to do this:

1. I have a text file with one line paths and file listing in it, for example:

    E:\Movies\88Minutes-Gr8 Movie

2. I would like to show one line at a time to the user on a command based program (windows cmd) and let them "EDIT" the 'pre-loaded' text and press enter (accept it in a variable as string).

3. Again as an example, I want the output to be something like this:

# Step 1 (Output)

The movie:
E:\Movies\28.Days.Later[2002] _  # <--  my cursor is the underscore.

#Step 2 (User edits the field)

The movie:
E:\Movies\28 Days Later _    # <-- after I finish editing the line.

# Step 3 (Press Enter)

The movie:

Thank you.

# done

I hope I have made it clear. I cannot find a way to pre-load the buffer with a string and display it to the user for editing and then accepting it.

6 Years
Discussion Span
Last Post by xheavenlyx


Thanks a lot for the information. I have some options to choose from now:
Still a long way before choosing the right way.

1. msvcrt: Only windows fx, I cannot port my app to Linux/mac

2. readline: Cannot use it in Windows without adding the package seperately.

3. curses: This seems useful.

I will post results after using all of them.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.