// check to see which platform the script is running on // to set where to save the log file, and what kind of linefeed to use if ($.os.search(/windows/i) != -1) { folderName = "/c/"; fileLineFeed = "windows"; } else { folderName = "~/Desktop/"; fileLineFeed = "macintosh"; } // create the log file fileOut = new File(folderName + "time_test.log"); // Export to Excel Comma Delimited File instead of a .log file: // fileOut = new File(folderName + "time_test.csv"); // Use OS specific linefeeds fileOut.lineFeed = fileLineFeed; // open the file for writing fileOut.open("w", "TEXT", "????"); // Write a line to .log file // use commas as delimiters if you want to open the file in Excel // use "/r" to add carriage returns fileOut.write("Optimized File Name, JPEG Quality, Blur Amount, Time in seconds\r"); // Write another line to .log file fileOut.write("myName, myQuality, myBlurAmount, myTime"); // stop writing to the file fileOut.close(); // Open the file in it's associated application // .log files are associated with the "Console" on OS X fileOut.execute()