Login  Register

Re: Save as avi tries to open new avi

Posted by Michael Schmid on Feb 08, 2016; 10:37am
URL: http://imagej.273.s1.nabble.com/Save-as-avi-tries-to-open-new-avi-tp5015563p5015571.html

Hi Glen,

in addition to the wrong quote mentioned by Gabriel, for saving an AVI, please note that there must be a space at the end of "AVI... "
The menu commands for reading and writing AVI files are distinguished by whether there is a space at the end or not.
Use Plugins>Macros>Record to see the difference.

By the way, having a space at the end or not is used also to distinguish other commands that seem to be identical at first glance, e.g.
importing/saving "Image Sequence...",
importing/saving "Results..."
importing/saving "Text Image..."
importing/saving "XY Coordinates..."
Process>Math>Macro... and Process>Batch>Macro...,
Edit>Options>Reset... and Plugins>Untilities>Reset...
Plugins>New>Table... and File>Import>Table

Michael
________________________________________________________________
On Feb 7, 2016, at 22:01, Glen MacDonald wrote:

> thanks Herbie and Gabriel,
> Tested variations of your suggestions and still obtain a dialog to open an avi.
> the target directory string already ended in a File.separator, “/“:
> target=dir+basename+"Frequencies"+File.separator;
>
> ————extract and rename subset of movie--------
> savefreq=target+getTitle(); //replaced target=target+getTitle();
> run("AVI...","compression=JPEG frame=30 save=“+savefreq+".avi”);  
> then stripped off  the File.separator to copy Herbie’s exact syntax,
> run("AVI...","compression=JPEG frame=30 save="+target+"/test.avi”);// target is destination directory
>
> /Users/Histo/Desktop/Frequencies/
>
> Regards,
> Glen MacDonald
> Digital Microscopy Center
> Box 357923
> University of Washington
> Seattle, WA 98195-7923  USA
> (206) 616-4156
> [hidden email]
>
>
>
>
>
>
>
>
> On Feb 7, 2016, at 11:16 AM, Herbie <[hidden email]> wrote:
>
>> Good day Glen,
>>
>> This works for me:
>>
>> path = "/Applications/ImageJ/etc";
>> run("AVI... ", "compression=JPEG frame=30 save=" + path + "/Stack.avi");
>>
>> HTH
>>
>> Herbie
>>
>> ::::::::::::::::::::::::::::::::::::::::::::
>> Am 07.02.16 um 20:01 schrieb Glen MacDonald:
>>> Hello,
>>> The following line to save an AVI in a macro brings up a dialog window to open an avi.  the line was copied from the Macro Recorder and I only added the text between [].
>>>
>>> run("AVI...","compression=JPEG frame=30 save=["+target+wt+"]”);
>>> where target is the save directory and wt is the window title for the movie.
>>>
>>> Fiji, 2.0.0-rc-44/1.50e99, Java 1.8.0_65, OSX10.9.5
>>>
>>> Is this a simple syntax error?
>>>
>>> thanks,
>>> Glen MacDonald
>>> Digital Microscopy Center
>>> Box 357923
>>> University of Washington
>>> Seattle, WA 98195-7923  USA
>>> (206) 616-4156
>>> [hidden email]
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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