[Kde-bindings] KOffice Scripting for KDE4 (Was Re: Moving kross(kexi/scriptingcore) in libs)

Randy Kramer rhkramer at gmail.com
Sun Nov 6 13:40:38 UTC 2005


On Sunday 06 November 2005 05:52 am, Sebastian Sauer wrote:
---<good stuff snipped--I'm really just replying to the subject: KOffice 
Scripting for KDE4>---

And, I probably shouldn't say anything, because:
   * I've only lurked on this list a very short time, and haven't looked back 
at the beginning of this thread (or for other resources that might describe 
the plans for scripting in KOffice)
   * I'm at most a user (or maybe a "wannabee" developer), but have had very 
little experience using koffice (from the little I saw of it a few years ago, 
I preferred AbiWord, partly because the frame based approach (of kwrite) 
didn't mesh with my thought processes at the time (maybe still)
   * other reasons that don't come to mind at the moment

But, I wanted to contribute my $0.02 about what I think is useful in a 
scripting/macro language:

As a long time user of Word (until about 5 years ago), the primary way I 
developed scripts/macros was to start by recording a series of keystrokes 
with their "keyboard recorder".

It records "plain keystrokes", but also, if a keystroke invokes a function of 
any kind, it records that function instead of the plain keystroke.  E.g., if 
the <End> key invokes a function like move_end_of_document() (made up name 
for this example), the recorded macro shows "move_end_of_document()" instead 
of <End>.

That script can then be imported into their macro/script editor, and be edited 
by adding any commands/functions from their Visual Basic (for Applications?) 
language.  That makes it fairly easy for someone (like me) who doesn't write 
scripts very often to write one when necessary/helpful.

I hope this is part of what is being considered.  

PS: Java scares me, as the few times I attempted to get into it (or C++), I 
gave up (for a variety of reasons--but mainly due to the appearance of it 
being very complicated (too many functions to sort through) and me coming 
from a procedural rather than object-oriented background).  

Still, if there is a facility as described above, where the beginning of a 
script/macro can be recorded, with some Java functions "magically" included 
(end_of_document()), and some easy to use references to other Java functions 
(e.g., conditional statements, which generally couldn't be recorded in Word 
but had to be added "by hand" later (during the script editing process)), 
maybe more people would become comfortable with Java by a process of 
"osmosis".

BTW, all of Word's scripts/macros can in turn be assigned to keyboard 
shortcuts.

If this is just repetition of things you already know or have planned (or is 
so far off base as to be irrelevant), sorry for the noise!

regards,
Randy Kramer



More information about the Kde-bindings mailing list