Login  Register

Re: Copy-paste bug on Mac OSX

Posted by Daan VAN DEN BRINK on Jun 17, 2016; 8:42am
URL: http://imagej.273.s1.nabble.com/Stack-Label-bug-in-macro-tp5016655p5016680.html

Hello Jan,

on my system it doesn't work either:

OSX 10.9.5
ImageJ 1.51d
Java 1.8.0_65 (64bit)

by the way, I can copy TO the macro editor from any other application,
but I can't copy from the macro-recorder by key-board short-cut (there's
also no pop-up menu when right clicking on the recorder).

By the way #2, where on http://imagej.net/Fiji can I found out what is
the most recent imagej version? Just to make sure my fiji has updated
itself properly.

Daan

On 16/06/16 18:00, Jan Eglinger wrote:

> Hi Glen,
>
> that's interesting. Copy and paste from the keyboard *does* work as
> expected for me on MacOSX 10.11.5 with an up-to-date Fiji installation
> and Java 1.8.0_66
>
> What system/version do you use?
>
> Jan
>
>
> On 16.06.2016 17:54, Glen MacDonald wrote:
>> Yes, there was a thread last year and bug was fixed in 1.50e-something.
>> But, no, copy and paste from the keyboard does not work.   I recalll
>> that it was once possible to copy from the edit menu then paste from
>> the script window's edit menu or right click.
>>
>>
>> Glen MacDonald
>> Digital Microscopy Center
>> Box 357923
>> University of Washington
>> Seattle, WA 98195-7923  USA
>> (206) 616-4156
>> [hidden email]
>>
>>
>>
>>
>>
>>
>>
>>
>>> On Jun 16, 2016, at 8:37 AM, Jan Eglinger <[hidden email]>
>>> wrote:
>>>
>>> Hi Glen,
>>>
>>> On 16.06.2016 17:12, Glen MacDonald wrote:
>>>> But, copy and paste from the macro recorder seems to have quit
>>>> working again on the Mac.
>>>
>>> yes, this is an annoying bug in Java on Mac that I've encountered
>>> before as well. (There even should be an old bug report tracked
>>> somewhere online).
>>>
>>> What usually helps is activating any other app, e.g. the Finder, and
>>> re-focussing on ImageJ before pasting the command:
>>>
>>>  - Select code in the recorder
>>>  - Cmd-C to copy
>>>  - click on the Desktop background to activate Finder
>>>  - click on the Script editor window
>>>  - Cmd-V to paste
>>>
>>> This worked for me in the past.
>>>
>>> Cheers
>>> Jan
>>>
>>>
>>>
>>>>
>>>>
>>>>> On Jun 16, 2016, at 6:54 AM, Jan Eglinger <[hidden email]>
>>>>> wrote:
>>>>>
>>>>> Hi Glen,
>>>>>
>>>>> to avoid mistakes like the one you mentioned, you can rely on the
>>>>> macro recorder [1].
>>>>> This is what it recorded when I used the 'Image > Stacks >
>>>>> Label...' command on a stack:
>>>>>
>>>>>   run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24
>>>>> text=[ Frames] range=1-114 use");
>>>>>
>>>>> Hope that helps,
>>>>> Jan
>>>>>
>>>>> [1]: http://imagej.net/Macro_recorder
>>>>>
>>>>>
>>>>> On 15.06.2016 21:00, Glen MacDonald wrote:
>>>>>> Thanks Theresa,
>>>>>> My internal proof reader seems increasingly incompetent!  I had
>>>>>> also left out “=“ on the following line for time, which was
>>>>>> perfectly working to give ‘0’ seconds for the initial time.
>>>>>>
>>>>>>
>>>>>> Glen MacDonald
>>>>>>
>>>>>>
>>>>>>> On Jun 15, 2016, at 11:45 AM, Swayne, Theresa C.
>>>>>>> <[hidden email]> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Hi Glen,
>>>>>>>
>>>>>>> I think there was an “=“ somehow missing in “starting 1".
>>>>>>>
>>>>>>> Try this (you might have to replace the automatic curly quotes
>>>>>>> with normal ones):
>>>>>>>
>>>>>>> run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24
>>>>>>> text=[ Frames] range=1-1000 use”);
>>>>>>>
>>>>>>> This line labels the first frame (using the Mitosis sample) with
>>>>>>> 1 as desired. But unfortunately, when I use the overlay option,
>>>>>>> I get the same label on every frame instead of an incremented
>>>>>>> label. This seems to be an overlay-specific issue that was
>>>>>>> discussed recently on this
>>>>>>> thread<https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match;Match;Matches&z=4&P=29225>:
>>>>>>> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=29225 
>>>>>>>
>>>>>>>
>>>>>>> If you can use a burned-on label instead of the overlay, the
>>>>>>> label will increment properly. (Remove the “use” option.)
>>>>>>>
>>>>>>> Hope this helps.
>>>>>>> Theresa
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Jun 15, 2016, at 2:22 PM, Glen MacDonald
>>>>>>> <[hidden email]<mailto:[hidden email]>> wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>> Instructing the Image>Stacks>Label… command to print frame
>>>>>>> number on a stack, starting with ‘1’, records as this:
>>>>>>> run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24
>>>>>>> text=[ Frames] range=1-1000 use”);
>>>>>>> The Label… preview displays correctly the first slice labeled as
>>>>>>> ‘1’.
>>>>>>>
>>>>>>> However, running this line in a macro prints ‘0’ on the first
>>>>>>> frame.
>>>>>>> I can work around it, but is an inconsistency.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Glen MacDonald
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--

*Daan M. VAN DEN BRINK*

Laboratoire de Biologie Moléculaire de la Cellule (LBMC) - UMR 5239

  Team Mollereau

*ENS de Lyon* — Site MONOD - LR2

   46 allée d'Italie — 69364 LYON CEDEX 07, FRANCE

   Tel.: +33 (0)4.72.72.89.29


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html