Automatic plugin launch

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatic plugin launch

Laurent Siquier
Hello,

I was wondering if there is any way to automatically execute a plugin at micro-manager startup either using a command line or a piece of script ?

Thanks by advance for your answers,

Best Regards,

d!



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Automatic plugin launch

JonD
Administrator
This post was updated on .
Hi Laura,


Laurent Siquier wrote
> I was wondering if there is any way to automatically execute a plugin at
> micro-manager startup either using a command line or a piece of script ?

Two parts to the answer: use a startup script and have that script launch
the plugin as desired.

If a Beanshell script MMStartup.bsh exists in the root directory (e.g.
C:\Program Files\Micro-Manager-1.4) then the script will get executed at
startup.  Various things can go in the script.  I've found it occasionally
helpful; using a System/Startup configuration group as described on the wiki
is usually sufficient.

To launch a plugin from a Beanshell script you just need to instantiate the
main frame.  You may have to dig a bit in the source code to find the name
of the Java class.  Here is example code for the ASI diSPIM plugin:

import org.micromanager.asidispim.ASIdiSPIM;
ASIdiSPIM plugin = new ASIdiSPIM();
plugin.setApp(gui);

Jon

--------------------------------------------
Jon Daniels
Applied Scientific Instrumentation
29391 West Enid Rd, Eugene, OR 97402
Phone: (541) 461-8181 x118
--------------------------------------------



--
Sent from: http://micro-manager.3463995.n2.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
micro-manager-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/micro-manager-general