On Thursday 15 January 2004 08:38, you wrote:
> On Jan 14, 2004, at 7:54 PM, Vaughn Treude wrote:
> > On Wednesday 14 January 2004 22:00, you wrote:
> >> On Jan 14, 2004, at 2:21 PM, Vaughn Treude wrote:
> >>> Here's a question for you web gurus: what I want to do is to control
> >>> a web
> >>> browser programmatically, specifically to tell an open browser window
> >>> to open
> >>> a new URL automagically rather than typing it in. It could be any
> >>> Linux
> >>> browser: Mozilla, Netscape, Galeon, Konqueror, Opera - maybe even
> >>> Lynx.
> >>
> >> Konqueror is HUGELY scriptable.. as are quite a few KDE apps. They
> >> use
> >> the DCOP communication protocol which allows lightweight (but very
> >> easy
> >> to use) RPC. You can query and modify almost every property it has.
> >> This includes such things as (but not limited to):
> >
> > This is exactly what I was looking for - thanks! The article you
> > mentioned
> > looks good. One question, though: what does the "-1187" in your
> > examples
> > mean? Is this a universal thing? I've tried some of these commands
> > and
> > encountered the error "object not accessible." Do I need to replace
> > the
> > "-1187" with something llike a process ID of a running konqueror
> > program?
> > (That didn't seem to work either.) Or is it some sort of version
> > string?
>
> It is indeed related to the process ID. If you run 'kdcop' (the
> graphical DCOP browser) or 'dcop' (the command line version), you'll
> see that there are two types of object types. The first are for
> applications like kwin and kicker that are singletons. Since only one
> instance of them will ever exist, they are referenced only by name.
> The second type are for applications that can have multiple running
> versions (like konsole, konqueror, kbiff). These have the processed ID
> prepended to the object name.
>
> Try typing just 'dcop' on the command line and it will show you all the
> top-level objects on your system.
>
> Since there can be multiple running Konqueror instances, it's sometimes
> tricky to find the one that you want. One way is to "know" what PID it
> is from some external means (capture it when you start up, for
> instance). Another way is to do something like:
>
Kurt,
That makes sense. I'm still having a bit of difficulty though. I have a
copy of konqueror with a pid of 18070, which I got from running "dcop" with
no parameters. Running "dcop konqueror-18070" succeeds; it gives me a list
which may be the accessible objects. Unfortunately, konqueror-mainwindow#1
is not among them. I tried another version of the command:
dcop konqueror-18070 konqueror-mainwindow\#1
object 'konqueror-mainwindow#1' in application 'konqueror-18070' not
accessible
That seems to be the reason for my inability to set a new URL in the main
window. But I wonder why I can't see that main window.
Thanks,
Vaughn
> #!/bin/sh
> # find the first running instance of konqueror
> konqueror=`dcop | grep konqueror`
> dcop $konqueror $cmd
>
> Kurt
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss