This perl+tcl/tk script can be embedded to act as a GUI for prompting and entering replies. % ./tkquery -help tkquery version 0.3 Copyright (c) Karl J. Runge 1994. tkquery: Query user for button click response or text entry, then send response to standard output and terminate. (with option to stay active) Usage: tkquery [-e -ed "LABEL::TEXT::WIDTH" ] [ -b -bd -be "LABEL::FLAG" ] ... [ -b ... ] [-stayalive] [-d] [-t title] [-j ] [-f font] [-v] [-examples] [-h -help] [-nok -nocancel] [-m] "MESSAGE" -e => entry widget (one only) with label LABEL and initial text TEXT -b => button widget (any number) with label LABEL and stdout reply FLAG -t => window manager title -examples => print examples -h => print help -v => print version information -d => debug mode -stayalive => only clicking a -bd button or -ed entry will terminate -be => button widget returns "FLAG"."contents of EntryBox" -nok => No "OK" button -nocancel => No "Cancel" button -no => both. -m => Message at top (-m optional if this is last entry) -j (left|center|right) => justification of message. -f => font (possibly just a number) for message. -cr => Prepend "str" to carriage return entry string. When a button is pressed the contents of it's corresponding FLAG is returned to the standard output of tkquery, which then exits. Default FLAG for OK button is 'OK' and for Cancel button is 'CANCEL'. If the entry box is present (via -e), then the contents of the entry box is returned to the standard output. If entry widget exists, then OK or in entry returns contents of entry box, otherwise OK returns `OK'. Here are two examples: tkquery -e "Host: ::my-pc.wu.edu::16" "Enter IP address of remote host" tkquery -b Quit::QUIT -b "Sleep 60 sec::SLEEP" -b "Reboot::REBOOT" \ -no "What should we do next??" % ./tkquery -examples tkquery version 0.3 Copyright (c) Karl J. Runge 1994. Examples: tkquery -e "Host:" "Enter IP address of remote host" tkquery -e "Host: ::rtfm.mit.edu::16" "Enter IP address of remote host" tkquery -b Quit::QUIT -b "Sleep 60 sec::SLEEP" -b "Reboot::REBOOT" \ -no "What should we do next??" tkquery -no -b Dismiss::D "Backup complete" tkquery -stay -no -b Check::CHECK -bd Quit::QUIT "Tell me when \ to Check..." Here is a little script using tkquery as a gui frontend to gopher: #!/bin/sh RESPONSE="`tkquery "Enter Gopher host (Blank for default)" -e "Host:"`"; if [ "$RESPONSE" != "CANCEL" ]; then xterm -e gopher $RESPONSE; fi Here is an endless loop of user event responses. #!/bin/sh tkquery -stay -no -b A::A -b B::B -b C::C -bd Quit::QUIT "What next?" | { while read x do echo Hey, I got $x done } DEPENDENCIES: Only runs effectively on Unix. Requires perl. INSTALLATION: chmod 755 tkquery, put tkquery in a PATH dir. May have to set path to perl and wish in the script.