Login  Register

Re: Copy-paste bug on Mac OSX

Posted by Jan Eglinger on Jun 16, 2016; 3:45pm
URL: http://imagej.273.s1.nabble.com/Stack-Label-bug-in-macro-tp5016655p5016670.html

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