Created
May 30, 2012 04:05
-
-
Save hilukasz/2833670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CSV(how, exportObjectSize, docName){ | |
this.how = how; // append is default | |
this.exportSize = exportObjectSize; // yes/no | |
this.docName = docName; // file name to export to | |
} | |
CSV.prototype.export = function(input) { | |
var inputFolder = Folder.selectDialog(); | |
var csv = new File(inputFolder+"/"+this.docName+".csv"); | |
// open text again | |
switch(this.how) { | |
case "overwrite": csv.open("w"); break; //overwrite last setting | |
case "append": csv.open("a"); break; //append to file | |
default: csv.open("a");// set default to append to file | |
} | |
csv.writeln(input); // write your new data to it | |
csv.close(); // close csv | |
} | |
var newExport = new WuCSV("append", "yes", "sizes"); | |
newExport.exportMe(firstSymbol.getWidthHeight()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment