On 2 Jun, Graeme McCaffery wrote:
> does anyone have a script, like the one for tkgoodstuff
> that will send netscape a string that's highlighted.
Yup, I've bound mouse button 3 to a shell script (which uses tcl/tk to
get the selection) that will connect with a netscape session. Note
that embedded double quotes in the selection will cause some problem.
Here's the ns-sel.sh script:
#! /bin/sh
NETSCAPE=netscape301
sel=`tksel.tk`
if [ -n "$sel" ]
then
ARG="-raise -remote OpenURL($sel,new-window)"
else
ARG="$sel"
fi
exec $NETSCAPE $ARG
(Replace 'NETSCAPE' assignment with the name of your netscape
executable... we have multiple versions of netscape here, so
'netscape301' runs one of the latest). The selection is retrieved by a
tcl/tk script called 'tksel.tk' which is reproduced below:
#! /bin/sh
# *-tcl-* \
exec wish4.2 $0 $*
wm withdraw .
puts [selection get]
destroy .
You may want to change the name of your wish interpreter in this
script. The logic should be pretty easy to figure.
Another application that could be use is 'xcb' (a standard X utility
that manipulates the various cut buffers). The problem that I've
found is that tcl/tk's selection mechanism seems to be superior to
that used by xcb.
Of course, your milage may vary. [smile]
--
(void) lar3ry(); gensch_at_zk3.dec.com
"Sometimes it happens. People just explode. Natural causes."
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Mon Jun 02 1997 - 09:00:41 BST