scripts in MM2

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

scripts in MM2

MORRISON Harris
Hi,

Slowly but surely moving across to Win10 and MM2 but users do like some familiarity and running scripts/shorts is popular, especially when F keys are assigned to viewing a particular channel; No need to look up from the microscope to manually select another channel. We, or at least my colleague, write these for 1.4 but they don't function in 2. Can someone look at one example attached, point out the  equivalent command line errors and then we can 'simply' roll this out in the other scripts we have? This line, for starters, is throwing up errors in the script panel

mmc.setChannelGroup(channelGroup);

Many thanks in advance,

Harris (non-programmer!!)



Harris Morrison

Advanced Imaging Resource (AIR)

MRC Human Genetics Unit

Institute of Genetics and Molecular Medicine (IGMM)

Carrington Crescent,

University of Edinburgh

Crewe Road

EH4 2XU


The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.

_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

View FITC.bsh (624 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: scripts in MM2

MORRISON Harris
Hi All,

Ignore the original question in part, a change in line and group has sorted this script.

mm.compat().refreshGUI();

to:

mm.app().refreshGUIFromCache();


But how to actually pull up a shortcuts window, so that the script assigned to a particular key, i.e. F2, can be used, allowing our user to change channels without removing their eyes from the eyepieces/microscope?? The Shortcuts are in the Tools menu so have just assumed they are still usable over the Quick Access Panel, where a keyboard key cannot be assigned.....or can it?

Cheers,

H





Harris Morrison

Advanced Imaging Resource (AIR)

MRC Human Genetics Unit

Institute of Genetics and Molecular Medicine (IGMM)

Carrington Crescent,

University of Edinburgh

Crewe Road

EH4 2XU



From: MORRISON Harris <[hidden email]>
Sent: 13 January 2020 15:04
To: Micro-Manager General <[hidden email]>
Subject: [micro-manager-general] scripts in MM2
 
Hi,

Slowly but surely moving across to Win10 and MM2 but users do like some familiarity and running scripts/shorts is popular, especially when F keys are assigned to viewing a particular channel; No need to look up from the microscope to manually select another channel. We, or at least my colleague, write these for 1.4 but they don't function in 2. Can someone look at one example attached, point out the  equivalent command line errors and then we can 'simply' roll this out in the other scripts we have? This line, for starters, is throwing up errors in the script panel

mmc.setChannelGroup(channelGroup);

Many thanks in advance,

Harris (non-programmer!!)



Harris Morrison

Advanced Imaging Resource (AIR)

MRC Human Genetics Unit

Institute of Genetics and Molecular Medicine (IGMM)

Carrington Crescent,

University of Edinburgh

Crewe Road

EH4 2XU


The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.


_______________________________________________
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: scripts in MM2

Nico Stuurman-2
Hi Harris,

>
> Ignore the original question in part, a change in line and group has
> sorted this script.
>
> mm.compat().refreshGUI();
>
> to:
>
> mm.app().refreshGUIFromCache();
>
>
> But how to actually pull up a shortcuts window, so that the script
> assigned to a particular key, i.e. F2, can be used, allowing our user
> to change channels without removing their eyes from the
> eyepieces/microscope?? The Shortcuts are in the Tools menu so have
> just assumed they are still usable over the Quick Access Panel, where
> a keyboard key cannot be assigned.....or can it?

I don't think that anything changed with the Shortcuts.  Those still
work exactly as in 1.4, so after you port your script, assign the key as
before, and

The Quick Access Panel is yet another way to facilitate workflow (and
there will soon be a third way, called Emu), but it does not have the
ability to assign keys.  That would actually be a good idea (i.e.,
retire the Shortcut menu entry, and add the ability to assign hotkeys to
the icons in the Quick Access Panel).


Best,

Nico


_______________________________________________
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: scripts in MM2

MORRISON Harris
Hi Nico,

Thanks for the speedy reply.

To activate/open the shortcuts we have the attached script in our Startup file. This works fine in 1.4 but doesn't appear to in MM2 (Latest version)! Is there something obvious missing in the ShortcutBar??

And, being able to assign hotkeys to the Quick Access Panel would be really  good, a lot of our users like to look directly at their samples and change channel from the keyboard without looking up. Emu sounds interesting too, will keep my eyes open for this.

Many thanks again.

Harris


Harris Morrison

Advanced Imaging Resource (AIR)

MRC Human Genetics Unit

Institute of Genetics and Molecular Medicine (IGMM)

Carrington Crescent,

University of Edinburgh

Crewe Road

EH4 2XU



From: Nico Stuurman <[hidden email]>
Sent: 13 January 2020 19:22
To: Micro-Manager General <[hidden email]>
Subject: Re: [micro-manager-general] scripts in MM2
 
Hi Harris,
>
> Ignore the original question in part, a change in line and group has
> sorted this script.
>
> mm.compat().refreshGUI();
>
> to:
>
> mm.app().refreshGUIFromCache();
>
>
> But how to actually pull up a shortcuts window, so that the script
> assigned to a particular key, i.e. F2, can be used, allowing our user
> to change channels without removing their eyes from the
> eyepieces/microscope?? The Shortcuts are in the Tools menu so have
> just assumed they are still usable over the Quick Access Panel, where
> a keyboard key cannot be assigned.....or can it?

I don't think that anything changed with the Shortcuts.  Those still
work exactly as in 1.4, so after you port your script, assign the key as
before, and

The Quick Access Panel is yet another way to facilitate workflow (and
there will soon be a third way, called Emu), but it does not have the
ability to assign keys.  That would actually be a good idea (i.e.,
retire the Shortcut menu entry, and add the ability to assign hotkeys to
the icons in the Quick Access Panel).


Best,

Nico


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.

_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general

ShortcutBar.bsh (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: scripts in MM2

Nico Stuurman-2
Hi Harris
> To activate/open the shortcuts we have the attached script in our
> Startup file. This works fine in 1.4 but doesn't appear to in MM2
> (Latest version)! Is there something obvious missing in the ShortcutBar??

I am a bit confused about the work-flow.  It looks like you use this
script (written by Mark) to open a window with buttons that get their
actions from the Shortcuts that were previously defined?  If that is
correct, the only reason to run the script is to get the buttons, you
should still be able to set up the keyboard shortcuts like usual.  The
reason the script no longer works is that the API has changed from 1.4
to 2.0. However, I don't really see a reason for using the script any
more.  Set up the keyboard shortcuts (Tools > Shortcuts) to do what you
like, and also set up the Quick Access Panel to get buttons that do the
same thing.

Best,

Nico




_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general