save file problems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

save file problems

Ben Liu-3
Hi there,

1. I wanna use the SaveDialog class to save the result from a result table,
but it did not save the result.

    IJ.selectWindow(rtTitle);  //select the ResultTable window.
    SaveDialog sd = new SaveDialog("Save result...", rtTitle, ".txt");

2. How to save the result without a dialog showing up? Using something like
    IJ.run("Text..., "save='D:\\Program Files\\ImageJ\\Results from " + imgTitle + ".txt'");

shoud work, but it needs to add extra "\"s. Is there a better way?

Thanks.

Best wishes,
Bian Liu