home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!mcsun!sunic!ericom!eos.ericsson.se!etxmesa
- From: etxmesa@eos.ericsson.se (Michael Salmon)
- Subject: Re: X thing to get string?
- Message-ID: <1992Jul23.075555.4764@ericsson.se>
- Sender: news@ericsson.se
- Nntp-Posting-Host: eos6c02.ericsson.se
- Reply-To: etxmesa@eos.ericsson.se (Michael Salmon)
- Organization: Ericsson Telecom AB
- References: <1992Jul22.161235.18528@cs.unca.edu>
- Date: Thu, 23 Jul 1992 07:55:55 GMT
- Lines: 58
-
- In article <1992Jul22.161235.18528@cs.unca.edu>, mcmahan@cs.unca.edu (Scott McMahan -- Genesis mailing list owner) writes:
- |> Is there an X program, preferably Motif-oriented (not that I'm that
- |> picky :^)), that will pop a dialogue box, get a string from the user,
- |> and print it on the stdout?
-
- This sounds very like xprompt:
-
- Xprompt provides a means by which programs can ask the user
- for one or more responses. I have found it especially useful for
- reducing the size of my (tv)twm menus.
- Instead of hardwiring alternatives into a menu, a single script is used
- to call xprompt and then invoke the appropriate thing.
-
- For example, I have a twm menu item:
-
- "RLOGIN" !"xprompt.rlogin &"
-
- that invokes a shell script called xprompt.rlogin:
-
- #! /bin/sh
-
- defaulthost=${HOME}/.xprompt.rlogin
- reply=
-
- if [ -r $defaulthost ]
- then
- reply=`cat $defaulthost`
- fi
-
- reply=`xprompt -p "Hostname" -r "$reply"`
- if [ $? = 1 ]
- then
- exit 0
- fi
- echo "$reply" > $defaulthost
-
- xhost "$reply" > /dev/null 2>&1
- xterm -T "rlogin $reply" -e rlogin "$reply" &
-
- exit 0
-
- The author is:
-
- Barry Brachman | {alberta,uw-beaver,uunet}!ubc-cs!brachman
- Dept. of Computer Science| brachman@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
- Univ. of British Columbia| brachman@ubc.csnet
- Vancouver, B.C. V6T 1Z2 | Office: (604) 822-3123, FAX: (604) 822-5485
-
- --
-
- Michael Salmon
-
- #include <standard.disclaimer>
- #include <witty.saying>
- #include <fancy.pseudo.graphics>
-
- Ericsson Telecom AB
- Stockholm
-