[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] How do I paste without a rat?
From: |
Shawn Betts |
Subject: |
Re: [RP] How do I paste without a rat? |
Date: |
Tue, 04 Apr 2006 04:04:11 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) |
rubikitch <address@hidden> writes:
> Hi,
>
> How do I paste without a rat?
> It is wonderful to manipulate X selection with putsel/getsel!
> Fortunately they can handle even Japanese characters!! (with i18n patch)
> But I cannot find out PASTING without a rat.
>
> I want to automate WINE app.
> `ratclick 2' cannot effect pasting in WINE app.
> But I want to paste X selection to WINE app.
>
> `meta' can stuff a character, I think it is time to implement `stuff'
> and `paste' command in RP.
stuff would send a sequence of characters to the window?
paste would send the sequence of characters in the selection buffer?
Just because I love torture i wrote them up as aliases with perl:
alias stuff exec perl -e 'for ($i=0; $i<length($ARGV[0]); $i++) { system
("$ENV{RATPOISON} -c \"meta " . substr($ARGV[0],$i,1) . "\""); }'
alias paste perl -e 'for ($i=0; $i<length($ARGV[0]); $i++) { system
("$ENV{RATPOISON} -c \"meta " . substr($ARGV[0],$i,1) . "\""); }' `$RATPOISON
-c getsel`
Nasty eh? They're kinda slow, too. I can see it worthwile having C
versions. Feel free to write up a patch :).
-Shawn