Il 27/01/2011 02:02, Pavel Sanda ha scritto:
Tommaso Cucinotta wrote:
AFAIK, LyX incorporates something that allows me to achieve this.
afaik there is no such thing. on the other many things you have written should
be easily doable via lyx server (look on lyxclient binary). to get precise
info about cursor or selection info one may need new lfun, but nothing
substantial.

then it would be just script which calls sequence of lfuns and get exported
tex file which would compare via standard diff.

In order to not get too much bored on the return flight to Pisa, I just went
through the stuff in development/keystest. Apparently, it may also be used
as an engine to trigger LyX with a sequence of keyboard-based actions.

If I'm not mistaken, the CommandSourceFromFile Python class in keytest.py
loads key sequences from a file (as opposed to generating them randomly)
and submits them to LyX. So, it would perhaps match exactly what I need
(I should be able to submit LFUNs via [A-x ...]).
Just, there seems to be some logic to randomly drop lines of the read file
which I might want to disable.

How can I start to make a simple run of this machinery, like a "HelloWorld"
that submits to LyX something like:

C-N
Hello World [RET]

? What would be pros and cons of going through the lyxserver ? Does keytest.py actually exploit the lyxserver itself ? My guess is not, it seems it exploits some magic
of X11 to submit keys to the windowing system.

Thanks,

    T.

Reply via email to