<div dir="ltr">Hi again Jan,<div><br></div><div>I have now changed the macro recording to generate the correct string, with image title as the value [1]. So when you record your Print Title script, you will now see:</div><div><br></div><div><span style="font-size:12.8000001907349px">  run("Print Title", "imp=blobs.gif name=Jan");</span><br style="font-size:12.8000001907349px"></div><div><br></div><div>And executing that line will repeat the action as expected.</div><div><br></div><div>These changes will be released and uploaded within the next few days.</div><div><br></div><div>Regards,</div><div>Curtis</div><div><br></div><div>[1] <a href="https://github.com/imagej/imagej-legacy/commit/61a004c40988581529c35c0d1e312b0d20c0a7bb" target="_blank">https://github.com/imagej/imagej-legacy/commit/61a004c40988581529c35c0d1e312b0d20c0a7bb</a></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 26, 2015 at 5:16 PM, Curtis Rueden <span dir="ltr"><<a href="mailto:ctrueden@wisc.edu" target="_blank">ctrueden@wisc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Jan,<span><div><br></div><div><div>> Is there a way to configure an ImagePlus (or Dataset or File) in this</div><div>> case?</div></div><div><br></div></span><div>Thanks for reporting this issue!</div><div><br></div><div>It is (partially) fixed in:</div><div><a href="https://github.com/imagej/imagej-legacy/commit/8cc4e7f37777bfe4d391e147d515238a8d0eaa23" target="_blank">https://github.com/imagej/imagej-legacy/commit/8cc4e7f37777bfe4d391e147d515238a8d0eaa23</a><br></div><div><br></div><div>At the moment, you will have to write:</div><div><br></div><div>  imp=blobs.gif</div><div><br></div><div>Or:</div><div><br></div><div>  imp=-2</div><div><br></div><div>(where -2 is the image ID you want)</div><div><br></div><div>instead of the string generated by the recorder.</div><div><br></div><div>I guess we could make that string (which is what ImagePlus.toString() produces, probably) work as well, if you feel strongly. Though IMO it just clutters the macro.</div><div><br></div><div>Regards,</div><div>Curtis</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 26, 2015 at 9:46 AM, Jan Eglinger <span dir="ltr"><<a href="mailto:jan.eglinger@gmail.com" target="_blank">jan.eglinger@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
how can I call a script using @Parameters (e.g. @ij.ImagePlus) from another script? Is this possible already?<br>
<br>
I tried the following Javascript:<br>
<br>
    // @ij.ImagePlus imp<br>
    // @String name<br>
    // @OUTPUT String result<br>
<br>
    result = "Hello, " + name + ", the title is " + imp.getTitle();<br>
<br>
<br>
and saved it into ./plugins/Print_Title.js<br>
When I run it, the macro recorder records something like:<br>
<br>
    IJ.run(imp, "Print Title", "imp=[img[blobs.gif (256x254x1x1x1)]] name=Jan");<br>
<br>
<br>
When I now run this (Beanshell) script (with blobs.gif still open):<br>
<br>
    import ij.IJ;<br>
<br>
    imp = IJ.getImage();<br>
    IJ.run(imp, "Print Title", "imp=[img[blobs.gif (256x254x1x1x1)]] name=Jan");<br>
<br>
the String is initialized correctly, but `imp` seems to be `null`. (Leaving away the imp=.. yields an error "'imp' is required but unset.")<br>
<br>
Is there a way to configure an ImagePlus (or Dataset or File) in this case?<br>
<br>
Thx,<br>
Jan<br>
<br>
_______________________________________________<br>
ImageJ-devel mailing list<br>
<a href="mailto:ImageJ-devel@imagej.net" target="_blank">ImageJ-devel@imagej.net</a><br>
<a href="http://imagej.net/mailman/listinfo/imagej-devel" rel="noreferrer" target="_blank">http://imagej.net/mailman/listinfo/imagej-devel</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>