HP Forums

Full Version: input from user
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there any way to get a single line input from user without filling the entire screen with a form as INPUT does?

The hard question is twofold. What i need is

(1) user input from the normal input line. Even msdos lets me do this.

(2) multi line user input . The INPUT function takes up the entire screen but still is a single line form.

What is needed is just simple access to the input buffer from a program.

avar := userinput ();

which returns a raw string when the user hits return.

So do i need to write my own editor just to get non-form base raw input?

> user input from the normal input line. Even msdos lets me do this.

But windows does not :-)

Prime is a GUI system, not a command line based system (although it is closer to it than windows).

User inputs in prime are either through the command line WHEN THE PROGRAM IS CALLED. As arguments to your program (MyProgram(args))
Or you need to spawn a GUI to get an input.

Prime does not have a console like dos does, your program can, for example, be called from the program catalog screen. At that point, there is no command line, no console...

INPUT is a very easy way to get data from the user (even if it's full screen). I mean INPUT(MY_Well_Named_Variable) is very simple and very efficient.
If you want a string, things are a little bit more complex as you need to tell INPUT to restrict the types of input that the user can enter (it tries to do too much for you by default).
INPUT({{My_String_Var, [2]}}) will do that, create a full screen INPUT that will request a string from the user and store it in My_String_Var

I hope that this helps.

I know it is gui based but the appearanve of bot the home and cas views is that of a console with scrolling history. The entry line certaintly looks and acts like a command line. It is access to that buffer that I would like but before the prime intercepts it.

I guess that is too far inside the systrm input.

I understand, and yes, you are correct, the home, or CAS does LOOK like a console driven interface... but is not one. It is more of a command line based IO system.

Could we have a different type of INPUT that would display the command line only (what would the rest of the screen look like BTW)?

It might be possible, we would need to look at it, but it is, for sure, not possible at this point in time.

Well, to tell my story i am trying to write an app which for .
no other reason than maybe nostalga will create a user rpl/rpn (48-50) interface and allows programs,variables, etc.

I have most of it working, simulated stack, rpl compiler, etc. In the end i will take over the entire screen and use mouse and keyboard events. The app will then own the keyboard and user interface.

What i was really after with my 'input' question was trying to avoid also having to build a full editor from scratch.

I know i can tranfer text to and from a system Note under program control . But what i cannot do is invoke the note text editor from a program and have it return the edited user input. It would make my day if i could do such a thing in the future.
Reference URL's