Subject: FVWM: Insert text in applications

From: Uwe Pross <[email-masked]>
Date: Wed, 17 Jul 2002 21:23:19 +0200

Hi there,

I wonder if it is possible to use fvwm to insert (often used) text in
applications as it would have been typed by the keyboard.

Some text one has to type very often e.g. the own email address or
account numbers.  It would be nice if this text can be inserted by a
key stroke or a mouse click.

Any suggestions how this can be achieved? Thanks in advance.

If this is possible one could think about a dynamic menu which holds
for example 10 often used entries. New entries can be added by a fvwm
function the oldest will removed automatically. Maybe someone has
already implemented something like this.

Uwe
--
+----------------------------------------------
| Uwe Pross
| mail : mailto:[email-masked]
| www  : http://www.tu-chemnitz.de/~uwp
+----------------------------------------------

Have a nice day;-).

-----------------------------------------------
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Rob 'Feztaa' Park" <[email-masked]>
Date: Wed, 17 Jul 2002 15:04:10 -0600

> already implemented something like this.

Such things exist, but this is far outside the scope of fvwm. Try
freshmeat.

-- 
Rob 'Feztaa' Park
http://members.shaw.ca/feztaa/
--
"We don't do a new version to fix bugs." - Bill Gates
"The new version - it's not there to fix bugs." - Bill Gates
	-- Retranslated from Focus 43/1995, pp. 206-212
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Uwe Pross <[email-masked]>
Date: Thu, 18 Jul 2002 07:38:50 +0200

> Such things exist, but this is far outside the scope of fvwm. Try

Actually making this menu is not that problem. The point was how can
strings inserted in applications as they where typed. 

Uwe
-- 
+--------------------------------------------------
| Uwe Pross 
| mail : mailto:[email-masked]
| www  : http://www.tu-chemnitz.de/~uwp
+--------------------------------------------------
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Rob 'Feztaa' Park" <[email-masked]>
Date: Thu, 18 Jul 2002 00:02:40 -0600

> strings inserted in applications as they where typed. 

Why not just use a clipboard? Then the strings are inserted with
something called "the middle mouse button". You can get fancy clipboard
applications that hold more than one string at once. Try freshmeat.

Biology grows on you.

---

From: Uwe Pross <[email-masked]>
Date: Thu, 18 Jul 2002 09:08:56 +0200

> applications that hold more than one string at once. Try freshmeat.

I found a program called xclip which may be used  to  achieve  what  I
want.  It can set and read the xselection. So thanks for the clipboard
hint. 

I tried to use it in conjunction with the fvwm FakeClick  command  but
without success. Maybe someone has an idea why it does not work:

DestroyFunc InsertTextInApplication
AddToFunc InsertTextInApplication
+ I Exec echo -n $* | $[HOME]/bin/xclip
+ I FakeClick press 2 wait 250 release 2

AddToMenu InsertPopup 
+ "Insert 109141029347" Function InsertTextInApplication 109141029347

When I select the menu entry above nothing happens. But I can insert
the number above by pressing the middle mouse button afterwards. 

Uwe

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 18 Jul 2002 10:16:37 +0200

> the number above by pressing the middle mouse button afterwards. 

As the description of the FakeClick command in the man page says,
there is no general solution to send clicks from fvwm to
applications.  On one hand, applications may (but rarely do)
ignore events that were not generated by the X server.  And on the
other hand events are sent to a specific sub window.  They do not
propagate from the window on the bottom to the hierarchy up to the
first window that wants these events.  There is no way to find out
the window in which the application expected the click.  That's
the reason for the "depth" option of the FakeClick command.  But
one depth setting may be good for one application and fail on
another one.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [email-masked], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Uwe Pross <[email-masked]>
Date: Thu, 18 Jul 2002 10:50:43 +0200

> one depth setting may be good for one application and fail on

Actually not the answer I expected :-| but thanks anyway for the
explanation.

Uwe