translation mouse gesture
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
(Sorry if this message is sent twice, to me it seems the first one didn't get
through...)
This might be usefull for some of you:
To translate a highlighted word using a mouse gesture, do the following:
1) Create a script with these lines (or just copy&paste):
##start here
WORD=`dcop klipper klipper getClipboardContents`
konqueror http://dict.leo.org/?search=$WORD &
exit 0
## end here
name it e.g. 'translator', make it executable and copy it to /usr/local/bin
(if you want systemwide access). DON'T ADD '#!/bin/sh' in the first line!
2) Using KHotkeys, select 'new action' and name it 'translate'.
3) Define a trigger you can easily remember. I used "74159", this is a
hook-shaped gesture.
4) As Action, define "Command/URL: translator"
5) Ready. You can use this gesture anywhere, the word added last in the
clipboard (=last highlighted word) will be sent to LEO for German/English or
English/German translation.
6) If you want other things happen to the highlighted word, change the URL in
the script. I got this from Konqui's web shortcuts: replace "\{@}" with
"$WORD".
Bye,
Elmar
- --
| Elmar W. Hoefner
| You can send me encrypted mail. Get my public PGP/GPG key from
| http://www.dfn-pca.de/pgpkserv/
| Key ID: 0xB53008E2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAe5/uWmu377UwCOIRAq/jAJ988df9xbgEtLWOOS0QLGjzsuGBlgCePhRD
ShPhPTYs7YuqkuBbnkReOaw=
=2VFg
-----END PGP SIGNATURE-----
Reply to: