How do I drive Konqueror from script?
Krzysztof Żelechowski
giecrilj at stegny.2a.pl
Mon Sep 20 19:45:18 BST 2010
Dnia poniedziałek, 20 września 2010 o 12:51:13 David Faure napisał(a):
> On Friday 09 July 2010, Krzysztof Żelechowski wrote:
> > I am looking for a way to write a script for the SMS feature in
> > KAddressBook. The script should go like this (in AppleScript pseudocode)
> >
> > const kGateURL = "..."
> >
> > on run
> > tell Konqueror
> > navigate to kGateURL
> > tell current document
> > tell form 0
> > set value of control "receiver" to %N
> > set value of control "message" to contents of file %F
> > reveal
> > end tell
> > end tell
> > end tell
> > end run
> >
> > Please give me some hints how I could actually implement this tidbit.
>
> This can be done with the evalJS dbus call.
>
> Here is an excerpt from a script of mine which scripts a webpage too:
>
Thanks. I could not wait that long, but surely somebody else will take advantage of that. I wrote something similar in Python [28], with some discussion of what I was unable to do.
Please consider that Konqueror, unlike e.g. Microsoft Internet Explorer, does not send notification events to driving scripts, so I have to display an alert. I find your active waiting unacceptable as a paradigm. The best I can do is to register an onload handler --- but the scripts running as the page is downloaded could kill it, so it is not a reliable approach, or display a modeless dialogue box wizard in a separate window, which I have not done because it is too much work for now, and I still do not know how to post events to the driver from such a window, and the wizard window talking to the gateway window would probably be blocked by domain restrictions.
Cheers,
Chris
___
[28] <URL:http://forums.opensuse.org/english/get-help-here/applications/401304-send-sms-message-cellphone-kontact-kaddressbook.html>
More information about the kfm-devel
mailing list