DCOP Resources
A simple example of using DCOP with kword
Set this to the PID of a running kword, or use e.g. appid=`dcopstart kword foo.kwd`
appid=kword-14966
Get main text frameset
fs=$(dcopobject "`dcop $appid Document-0 textFrameSet 0`")
Start editing it
edit=$(dcopobject "`dcop $appid "$fs" startEditing`")
Now you can insert text
dcop $appid $edit insertText 'Hello world!'
Use this to create new paragraphs
(only available from KOffice version 1.3.2 upwards)
dcop $appid $edit newParagraph
See "dcop kword-$pid $edit" for more (e.g. setBold true, moving the cursor, etc.)