kde hackers little friend - dcop
Do you want to script kde applications? Dcop could be the answere. There is an command line interface which is surprisingly called dcop. So for a quick start: Open a shell type: "dcop" and hit enter. You will see applications that have a dcop interface. If you are using klipper, which is normally the case, you can control the clipboard through it's dcop interface. Let's see howto do this. Type: "dcop klipper" and hit enter. You will see the supported interfaces. Type: "dcop klipper klipper" to check out the klipper-Interface. You will see the following interface:
QCStringList interfaces()Now you can simply call a method like this:
QCStringList functions()
QString getClipboardContents()
void setClipboardContents(QString s)
void clearClipboardContents()
void clearClipboardHistory()
QStringList getClipboardHistoryMenu()
QString getClipboardHistoryItem(int i)
int newInstance()
void quitProcess()
dcop klipper klipper setClipboardContents "Hello from dcop"This will put "Hello from dcop" to your clipboard.
Note that you can use tab-completition, so if you type: "dcop klipper klipper setC" and hit TAB it will complete to: "dcop klipper klipper setClipboardContent".

