MM2.0 startup scripts

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

MM2.0 startup scripts

Peterbauer Thomas
Hi all,

my startup scripts do not work any more in MM2.0. I think the problem can be traced down to the method executeStartupScript() in MMStudio.java. In version 1.4, this method contained:

         Interpreter interp = new Interpreter();
         try {
            interp.set(SCRIPT_CORE_OBJECT, core_);
            interp.set(SCRIPT_ACQENG_OBJECT, engine_);
            interp.set(SCRIPT_GUI_OBJECT, studio_);

            // read text file and evaluate
            interp.eval(TextUtils.readTextFile(startupScriptFile_));
            ....

Now, in version 2.0 (as on GitHub today), it sets only the core object:

         Interpreter interp = new Interpreter();
         try {
            interp.set(SCRIPT_CORE_OBJECT, core_);

            // read text file and evaluate
            interp.eval(TextUtils.readTextFile(startupScriptFile_));

Will this reduced feature remain? It would quite limit the use of startup scripts.

Best,
Thomas

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
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: MM2.0 startup scripts

Mark Tsuchida-2
On Thu, Aug 11, 2016 at 5:17 AM, Peterbauer Thomas
<[hidden email]> wrote:
> my startup scripts do not work any more in MM2.0. I think the problem can be traced down to the method executeStartupScript() in MMStudio.java. In version 1.4, this method contained:
[...]
> Will this reduced feature remain? It would quite limit the use of startup scripts.

The scripting API is completely revamped in 2.0. The 'mmc' object is
still available but 'gui' has been replaced with the modernized 'mm'
object. https://micro-manager.org/wiki/Version_2.0

Best,
Mark

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
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: MM2.0 startup scripts

Nico Stuurman-2
On 8/11/16 12:26 PM, Mark Tsuchida wrote:
> On Thu, Aug 11, 2016 at 5:17 AM, Peterbauer Thomas
> <[hidden email]> wrote:
>> my startup scripts do not work any more in MM2.0. I think the problem can be traced down to the method executeStartupScript() in MMStudio.java. In version 1.4, this method contained:
> [...]
>> Will this reduced feature remain? It would quite limit the use of startup scripts.
> The scripting API is completely revamped in 2.0. The 'mmc' object is
> still available but 'gui' has been replaced with the modernized 'mm'
> object. https://micro-manager.org/wiki/Version_2.0

But it does seem to be the case that the startupscript (invoked in the
function executeStartupScript on line 1181 of MMStudio.java) only sets
the "core_" object, not the "mm", and "mmc" objects as is done during
initialization of the Script Panel.



Best,


Nico


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
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: MM2.0 startup scripts

Mark Tsuchida-3
On Thu, Aug 11, 2016 at 12:36 PM, Nico Stuurman <[hidden email]> wrote:

> On 8/11/16 12:26 PM, Mark Tsuchida wrote:
>> On Thu, Aug 11, 2016 at 5:17 AM, Peterbauer Thomas
>> <[hidden email]> wrote:
>>> my startup scripts do not work any more in MM2.0. I think the problem can be traced down to the method executeStartupScript() in MMStudio.java. In version 1.4, this method contained:
>> [...]
>>> Will this reduced feature remain? It would quite limit the use of startup scripts.
>> The scripting API is completely revamped in 2.0. The 'mmc' object is
>> still available but 'gui' has been replaced with the modernized 'mm'
>> object. https://micro-manager.org/wiki/Version_2.0
>
> But it does seem to be the case that the startupscript (invoked in the
> function executeStartupScript on line 1181 of MMStudio.java) only sets
> the "core_" object, not the "mm", and "mmc" objects as is done during
> initialization of the Script Panel.

Ouch, you're right. Will fix asap.
https://github.com/micro-manager/micro-manager/issues/399

Best,
Mark

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general