[Kstars-devel] KStars script

Mike Diehl madpenguin8 at yahoo.com
Tue Jun 28 05:39:52 CEST 2005


On Monday 27 June 2005 12:13 pm, Jason Harris wrote:

> Yes, I am planning to add DCOP functions that return values eventually, so
> you can probe the config, get the current simulation time, etc.  I should
> also add functions that save and restore the user's config, so you don't
> have to go through and store every option separately.

Just a simple suspend on saving the configuration would seem to do the trick, 
maybe something like suspendConfigurationForScript() and 
restoreConfiguration() would do.

> As written, KStars doesn't execute the DCOP script, it has an interpreter
> that parses the script and makes the calls internally.  I should just
> change this to make it execute the script.

In amaroK we just run scripts from a script manager, it's nothing more than a 
shell for the script to run in. We also send notifications to the scripts to 
allow amaroK to notify the scripts of certain changes that happen in the app, 
like volume level change. We can even add context menu items via DCOP. Here 
are a few links that might be of interest regarding how amaroK handles 
scripts.

http://amarok.kde.org/wiki/index.php/Script-Writing_HowTo
http://amarok.kde.org/blog/archives/35-More-scripting-goodies.html

And if you are interested in how the scripts are handled by amaroK, 
amaroK/src/scriptmanager.cpp is the place to look.

> I''l try to get these changes in for 3.5.

Thanks again for your time, I look forward to the next release. :)

Mike


More information about the Kstars-devel mailing list