Re: Programmatic control of Simon

"Steve Cookson" <[email protected]>
Newsgroups gmane.comp.kde.devel.accessibility
Message-ID <4C710DB41C104F21A143B7D8D27D0C90@SACWS001>
Hi Peter,

Well we have some great programmatic control of the system:

Starting simon is (from Perl):

	system "qdbus org.kde.simon";

Stopping is:

	system "qdbus org.kde.simon /simon/MainWindow_1
org.kde.simon.SimonView.closeSimon";

Switching on and off recognition is:
	system "qdbus org.kde.simon /simon/MainWindow_1
org.kde.simon.SimonView.toggleActivation";

The only occassional issue is that maybe simon is not in the state we think
it is, eg after a crash or user intervention.  Is there any way I can
determine if simon is Active or not?  Otherwise I deactivate it when I want
it active or activate it when it should be deactivated.

What do you think, we are using version 0.3.0 in (K)Ubuntu?

Regards

Steve

-----Original Message-----
From: Peter Grasch [mailto:[email protected]] 
Sent: 04 March 2012 06:08
To: [email protected]
Cc: Steve
Subject: Re: [Kde-accessibility] Programmatic control of Simon

Hi Steve,

Am Samstag, 3. März 2012, 18:49:33 schrieben Sie:
> While I am at it, are there similar DBus commands for monitoring Simon? So
> I'd
> like:
> 
> 1) To check regularly that Simon is running (say every second).
> 2) To restart it if needs be ( I guess this is a system command).
> 3) To close it if needs be.
To start simon and to check if it's running I'd rely on OS calls (or rather 
their abstraction in a perl module). To quit simon, you can call quit DBus
for 
a clean exit:
Service: org.kde.simon
Path: /MainApplication
Interface: org.kde.KApplication
Method: quit

Best regards,
Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.