The jprompt Input Panel

Introduction

The jprompt application is just a wrapper around the j:prompt procedure in the jprompts.tcl library. It's intended to make it easy to ask the user for a line of input from shell scripts, window­manager menus, etc.

This help file describes jprompt version 4.1/4.4.

Copyright and contact information is available in the jstools documentation.

Invocation and Usage

jprompt [-text text] [-char char] [-history name] [other options]

Invoking jprompt brings up a panel displaying text with an entry field for the user to type a response into and OK and Cancel buttons. The window­manager title will be title. When the user clicks OK, jprompt exits and writes what the user typed to standard output. If the user clicks Cancel, jprompt exits and, by default, writes nothing (except a newline) to standard output.

If -show char is specified, and char is not an empty string, then the entry will not display characters typed; the first character of char will be displayed in their place. This is useful for requesting passwords. (Warning: This doesn't work under versions of Tk prior to 4.0.)

If -history name is specified, values entered will be stored (persistently) in the history list named name; this lets users easily re­use previously entered values.

The value printed on Cancel can be specified, and there are a few other options not mentioned in this document; for full details, see the documentation for j:prompt in the jprompts.tcl library.

Both text and title are localisable.

Example

cat /tmp/out.$$ | enscript -2r -b`jprompt -text "Printout Title"`

Evolution

Feel free to report bugs (and feature requests) to me, <js@aq.org>, and I will try to deal with them. Also, feel free to fix bugs or add features on your own and let me know how you did it.