Fitsio
Dec 10 2007, 06:48 PM
Hi,
I couldn't figure out how to call a plugin from the commandline. The documentation says it should work like scripts ($pluginname) but how can I define a name for a plugin? For me, classnames did not work. Perhaps an example would shed some light to this problem?
Fitsio
Torc
Dec 15 2007, 11:23 PM
You have to add 'void run()' to the script. That function will be called when you type $classname on the commandline.
Fitsio
Dec 16 2007, 12:25 PM
Where did you get that information? It doesn't seem to work, but I haven't seen any reference to run method either, so perhaps you have more information than I do.
The javadoc mentions a void process(java.lang.Object data) method which I assume is the same with run() for scripts. Also, in the description of the method there are some words about calling the plugin from script, but there is no help at all in scripting section of the client about plugins.
Also, if it's not there already, I would like to see plugins being able to modify the strings one sends to the server.
Fiissio
Torc
Dec 16 2007, 02:14 PM
This is from the inbuilt scripting guide:
QUOTE
void run()
This method is called when the script is evaluated from the commandline, a trigger or a macro. The variable arg is a reference to any arguments given when running the script. For example if you call the script from the commandline as: "$test_script arg1 arg2 arg3". The arg string will be "arg1 arg2 arg3". It is then up to your script to parse the arguments as you see fit.
And it does work, I have one script that uses it.
kuhi
Dec 21 2007, 09:31 AM
Another dumb .... here unable to run plugin. Plugin loads fine, but I cannot run it.
Amarth
Dec 29 2007, 02:36 PM
Seems to me that there's a bug in existence with this. Will be fixed in next release.
(The Batclient-team is on Christmas / New Year holidays at the moment.)
Fitsio
Feb 21 2008, 11:18 PM
The plugins are now call-able in version 1.6, but the data Object given to the process(Object data) function seems to be always null.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.